package models import ( "github.com/gofrs/uuid" ) type Post struct { Base Title string `gorm:"not null"` Content string `gorm:"not null"` FrontPage bool `gorm:"not null"` Order int `gorm:"not null"` } type PostLinkType string const ( POST_LINK_FACEBOOK PostLinkType = "Facebook" POST_LINK_INSTAGRAM PostLinkType = "Instagram" POST_LINK_YOUTUBE PostLinkType = "YouTube" POST_LINK_SPOTIFY PostLinkType = "Spotify" POST_LINK_OTHER PostLinkType = "Other" ) type PostLink struct { Base PostId uuid.UUID `gorm:"type:uuid;column:post_foreign_key;not null;"` Link string `gorm:"not null"` Type PostLinkType `gorm:"not null"` } type PostImage struct { Base PostId uuid.UUID `gorm:"type:uuid;column:post_foreign_key;not null;"` Filepath string `gorm:"not null"` } type PostVideo struct { Base PostId uuid.UUID `gorm:"type:uuid;column:post_foreign_key;not null;"` Filepath string `gorm:"not null"` } type PostAudio struct { Base PostId uuid.UUID `gorm:"type:uuid;column:post_foreign_key;not null;"` Filepath string `gorm:"not null"` }