16 lines
461 B
Go
16 lines
461 B
Go
|
package models
|
||
|
|
||
|
// Source model
|
||
|
type Source struct {
|
||
|
BaseModel[AnthroveSourceID]
|
||
|
DisplayName string `json:"display_name" `
|
||
|
Domain string `json:"domain" gorm:"not null;unique"`
|
||
|
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"
|
||
|
}
|