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
2024-06-22 22:06:36 +02:00

15 lines
362 B
Go

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