Files
backend_v2/internal/model/content_status.go

18 lines
681 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
// 内容发布状态(单表发布模型)。
//
// 历史上「爬虫草稿」与「正式记录」是两张表,审核 = 从草稿晋升到正式表。
// 现在合并为一张表,审核态由本字段承载:
// - pending:刚入库,等待审核;公开视图不可见
// - published:已通过,对外可见
// - rejected:已驳回,留在库中备查;公开视图不可见
//
// 新增记录默认 pending(见各自模型的 gorm default),漏赋值的结果是「不可见」,
// 即 fail-closed,而不是意外对外发布。
const (
StatusPending = "pending"
StatusPublished = "published"
StatusRejected = "rejected"
)