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

15 lines
422 B
Go
Raw Normal View History

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