19 lines
429 B
Go
19 lines
429 B
Go
package pgModels
|
|
|
|
import (
|
|
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
|
)
|
|
|
|
// Post model
|
|
type Post struct {
|
|
BaseModel
|
|
Rating models.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"
|
|
}
|