otter-space-sdk/pkg/models/source.go
SoXX 0e6a8fd61e feat(database): added additional columns
added more columns

BREAKING-CHANGE: breaks database compatibility to older SDK versions
2024-08-09 21:37:54 +02:00

16 lines
453 B
Go

package models
// Source model
type Source struct {
BaseModel[SourceID]
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"
}