feat: 帖子全局/板块置顶支持权重排序,优化列表与详情渲染

This commit is contained in:
2026-09-08 23:54:03 +08:00
parent de2f5e8be8
commit 711cd8b759
16 changed files with 362 additions and 64 deletions

View File

@@ -113,8 +113,8 @@ type Post struct {
BountyCommentID uint `gorm:"default:0" json:"bounty_comment_id"` // 采纳的评论
LotteryWinnerCount int `gorm:"default:1" json:"lottery_winner_count"` // 抽奖人数(仅 lottery)
LotteryStatus string `gorm:"size:16;default:'';index" json:"lottery_status"` // open|drawn
Pinned bool `gorm:"default:false" json:"pinned"` // 全局置顶
BoardPinned bool `gorm:"default:false" json:"board_pinned"` // 板块内置顶
Pinned int `gorm:"default:0" json:"pinned"` // 全局置顶(0=未置顶,>0=置顶,数值越大越靠前)
BoardPinned int `gorm:"default:0" json:"board_pinned"` // 板块内置顶(0=未置顶,>0=置顶,数值越大越靠前)
Featured bool `gorm:"default:false;index" json:"featured"` // 推荐帖(原精华)
EditLocked bool `gorm:"default:false" json:"edit_locked"`
CommentsLocked bool `gorm:"default:false" json:"comments_locked"` // 禁止评论(结贴)