✨ Flag post
This commit is contained in:
10
pkg/internal/models/flags.go
Normal file
10
pkg/internal/models/flags.go
Normal file
@ -0,0 +1,10 @@
|
||||
package models
|
||||
|
||||
import "git.solsynth.dev/hypernet/nexus/pkg/nex/cruda"
|
||||
|
||||
type PostFlag struct {
|
||||
cruda.BaseModel
|
||||
|
||||
PostID uint `json:"post_id"`
|
||||
AccountID uint `json:"account_id"`
|
||||
}
|
@ -38,6 +38,7 @@ type Post struct {
|
||||
Categories []Category `json:"categories" gorm:"many2many:post_categories"`
|
||||
Reactions []Reaction `json:"reactions"`
|
||||
Replies []Post `json:"replies" gorm:"foreignKey:ReplyID"`
|
||||
Flags []PostFlag `json:"flags" gorm:"foreignKey:PostID"`
|
||||
ReplyID *uint `json:"reply_id"`
|
||||
RepostID *uint `json:"repost_id"`
|
||||
ReplyTo *Post `json:"reply_to" gorm:"foreignKey:ReplyID"`
|
||||
|
Reference in New Issue
Block a user