🎨 优化定时任务,优化定时发布文章功能

This commit is contained in:
2025-09-13 00:44:52 +08:00
parent f9b37fb1aa
commit a9b6816064
6 changed files with 85 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ package article
import (
"git.echol.cn/loser/lckt/global"
"time"
)
type Article struct {
@@ -15,8 +16,9 @@ type Article struct {
Price int64 `json:"price" gorm:"comment:文章价格(单位为分)"`
IsFree *int `json:"isFree" gorm:"comment:是否免费;default:0"` // 是否免费 0-否 1-是
// 分类ID
CategoryId int `json:"categoryId" gorm:"comment:分类ID"`
Status int `json:"status" gorm:"comment:状态 1-已发布 2-待审核 3-审核不通过;default:2"` // 状态 0-草稿 1-已发布 2-待审核 3-审核不通过
CategoryId int `json:"categoryId" gorm:"comment:分类ID"`
Status int `json:"status" gorm:"comment:状态 1-已发布 2-待审核 3-审核不通过;default:2"` // 状态 0-草稿 1-已发布 2-待审核 3-审核不通过
PublishTime *time.Time `json:"publishTime" gorm:"comment:定时发布时间"`
}
// TableName 文章表