otter-space-sdk/pkg/models/post.go
soxx 5aac1f2916
Some checks failed
Gitea Build Check / Build (push) Failing after 5m46s
feat(postgres): start implementing new generic orm model
Signed-off-by: soxx <soxx@fenpa.ws>
2024-06-25 09:09:18 +02:00

15 lines
378 B
Go

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