2024-07-19 08:03:35 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
// Source model
|
|
|
|
type Source struct {
|
2024-08-09 19:37:54 +00:00
|
|
|
BaseModel[SourceID]
|
2024-07-19 08:03:35 +00:00
|
|
|
DisplayName string `json:"display_name" `
|
2024-08-13 13:43:03 +00:00
|
|
|
Domain SourceDomain `json:"domain" gorm:"not null;unique"`
|
2024-07-19 08:03:35 +00:00
|
|
|
Icon string `json:"icon" gorm:"not null"`
|
|
|
|
UserSources []UserSource `json:"-" gorm:"foreignKey:SourceID"`
|
|
|
|
References []PostReference `json:"references" gorm:"foreignKey:SourceID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Source) TableName() string {
|
|
|
|
return "Source"
|
|
|
|
}
|