otter-space-sdk/pkg/models/post.go
SoXX 34c001473b
Some checks failed
Gitea Build Check / Build (push) Failing after 11m27s
migration from old git (no git history)
2024-07-19 10:03:35 +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"
}