Count replies and reposts

This commit is contained in:
2024-02-14 22:30:07 +08:00
parent 31a09a9074
commit 69b30c7dc6
4 changed files with 58 additions and 19 deletions

View File

@ -27,4 +27,6 @@ type Post struct {
// Dynamic Calculating Values
LikeCount int64 `json:"like_count" gorm:"-"`
DislikeCount int64 `json:"dislike_count" gorm:"-"`
ReplyCount int64 `json:"reply_count" gorm:"-"`
RepostCount int64 `json:"repost_count" gorm:"-"`
}