mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
17 lines
489 B
Go
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"
|
|
}
|