User can pin multiple posts

This commit is contained in:
2024-07-25 22:58:47 +08:00
parent 761d73100b
commit a4d8a3b37f
6 changed files with 45 additions and 11 deletions

View File

@ -17,9 +17,6 @@ type Account struct {
Reactions []Reaction `json:"reactions"`
ExternalID uint `json:"external_id"`
PinnedPost *Post `json:"pinned_post"`
PinnedPostID *uint `json:"pinned_post_id"`
TotalUpvote int `json:"total_upvote"`
TotalDownvote int `json:"total_downvote"`
}

View File

@ -28,6 +28,8 @@ type Post struct {
RepostTo *Post `json:"repost_to" gorm:"foreignKey:RepostID"`
Realm *Realm `json:"realm"`
PinnedAt *time.Time `json:"pinned_at"`
IsDraft bool `json:"is_draft"`
PublishedAt *time.Time `json:"published_at"`
PublishedUntil *time.Time `json:"published_until"`