18 lines
456 B
Go
18 lines
456 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')"`
|
|
Body string `gorm:"type:text"`
|
|
UserID int
|
|
Status string
|
|
Tags []Tag `gorm:"many2many:post_tags;"`
|
|
Favorites []UserFavorite `gorm:"foreignKey:PostID"`
|
|
References []PostReference `gorm:"foreignKey:PostID"`
|
|
}
|