feat: removed tags & added references for posts

Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
SoXX 2024-07-15 15:24:08 +02:00
parent b547b40410
commit 63f8902674

View File

@ -4,9 +4,9 @@ package models
type Post struct { type Post struct {
BaseModel[AnthrovePostID] BaseModel[AnthrovePostID]
Rating Rating `json:"rating" gorm:"type:enum('safe','questionable','explicit')"` Rating Rating `json:"rating" gorm:"type:enum('safe','questionable','explicit')"`
Tags []Tag `json:"tags" gorm:"many2many:post_tags;"` Tags []Tag `json:"-" gorm:"many2many:post_tags;"`
Favorites []UserFavorites `json:"-" gorm:"foreignKey:PostID"` Favorites []UserFavorites `json:"-" gorm:"foreignKey:PostID"`
References []PostReference `json:"-" gorm:"foreignKey:PostID"` References []PostReference `json:"references" gorm:"foreignKey:PostID"`
} }
func (Post) TableName() string { func (Post) TableName() string {