Files
phishingclub/backend/database/emailAttachment.go
2025-08-21 16:14:09 +02:00

17 lines
489 B
Go

package database
import (
"github.com/google/uuid"
)
// EmailAttachment is a gorm data model
// it is a many to many relationship between messages and attachments
type EmailAttachment struct {
EmailID *uuid.UUID `gorm:"primary_key;not null;index;type:uuid;unique_index:idx_message_attachment;"`
AttachmentID *uuid.UUID `gorm:"primary_key;not null;index;type:uuid;unique_index:idx_message_attachment;"`
}
func (EmailAttachment) TableName() string {
return "email_attachments"
}