feat: 定时发布系统 — Phase 5 完成

- Post ScheduledAt 字段
- Scheduler goroutine 每分钟扫描到期文章
- Create/Update 校验最短 30min 定时
- Approve 审核晚于定时则即时发布
- public 列表+空间页过滤未到期文章
- 写文章页 datetime-local 选择器(min=now+30min)
- AutoMigrate 追加新表
This commit is contained in:
2026-06-22 00:39:04 +08:00
parent 0b8f6f890d
commit e9b7401dc9
14 changed files with 132 additions and 15 deletions

View File

@ -45,6 +45,7 @@ type postStore interface {
RecordRead(userID, postID uint) (bool, error)
RecordGuestRead(visitorID string, postID uint) (bool, error)
IncrementViewsCount(postID uint) error
FindScheduledDue() ([]model.Post, error)
}
// spaceUserStore SpaceService 所需的最小用户仓储接口