refactor: Refactor Domain field to use SourceDomain type in Source struct

This commit is contained in:
SoXX 2024-08-13 15:43:03 +02:00
parent de28bdbb0b
commit 450e06eb25

View File

@ -4,7 +4,7 @@ package models
type Source struct {
BaseModel[SourceID]
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"`
UserSources []UserSource `json:"-" gorm:"foreignKey:SourceID"`
References []PostReference `json:"references" gorm:"foreignKey:SourceID"`