This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
otter-space-sdk/pkg/models/post.go
SoXX 63f8902674 feat: removed tags & added references for posts
Signed-off-by: SoXX <soxx@fenpa.ws>
2024-07-15 15:24:08 +02:00

15 lines
428 B
Go

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