feat: 文章属性 — Post Model 扩展 + 置顶系统

- Post 新增 7 字段:Visibility/PostType/ReprintSource/Declaration/ReprintProhibited/PinType/PinnedAt
- 公开列表过滤 private 文章(管理员可见全部)
- 列表排序:全局置顶 > 按时间
- declarationLabel 模板函数(7 种创作声明)
- Pin/Unpin API(admin+,category/global 两种置顶类型)
This commit is contained in:
2026-06-22 00:04:55 +08:00
parent fc57ed17d4
commit 9c452afb40
8 changed files with 127 additions and 8 deletions

View File

@ -74,6 +74,8 @@ func setupAdminRoutes(r *gin.Engine, cfg *config.Config, d *dependencies) {
adminPostAPI.POST("/:id/reject", d.adminPostCtrl.Reject)
adminPostAPI.POST("/:id/lock", d.adminPostCtrl.Lock)
adminPostAPI.POST("/:id/unlock", d.adminPostCtrl.Unlock)
adminPostAPI.POST("/:id/pin", d.adminPostCtrl.Pin)
adminPostAPI.POST("/:id/unpin", d.adminPostCtrl.Unpin)
adminPostAPI.POST("/:id/restore", d.adminPostCtrl.Restore)
}