refactor: Refactor Domain field to use SourceDomain type in Source struct
This commit is contained in:
parent
de28bdbb0b
commit
450e06eb25
@ -4,7 +4,7 @@ package models
|
|||||||
type Source struct {
|
type Source struct {
|
||||||
BaseModel[SourceID]
|
BaseModel[SourceID]
|
||||||
DisplayName string `json:"display_name" `
|
DisplayName string `json:"display_name" `
|
||||||
Domain string `json:"domain" gorm:"not null;unique"`
|
Domain SourceDomain `json:"domain" gorm:"not null;unique"`
|
||||||
Icon string `json:"icon" gorm:"not null"`
|
Icon string `json:"icon" gorm:"not null"`
|
||||||
UserSources []UserSource `json:"-" gorm:"foreignKey:SourceID"`
|
UserSources []UserSource `json:"-" gorm:"foreignKey:SourceID"`
|
||||||
References []PostReference `json:"references" gorm:"foreignKey:SourceID"`
|
References []PostReference `json:"references" gorm:"foreignKey:SourceID"`
|
||||||
|
Loading…
Reference in New Issue
Block a user