2026-07-27 00:18:42 +08:00
|
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
|
|
import "git.apinb.com/bsm-sdk/core/database"
|
|
|
|
|
|
|
2026-07-27 15:31:22 +08:00
|
|
|
|
// CmsContent 对应 cms_content,保存公告与协议内容。
|
|
|
|
|
|
type CmsContent struct {
|
2026-07-27 12:02:08 +08:00
|
|
|
|
Entity // 公共实体字段
|
|
|
|
|
|
ContentType string `gorm:"column:content_type;type:varchar(32);not null" json:"content_type"` // content_type 业务字段
|
|
|
|
|
|
Title string `gorm:"column:title;type:varchar(256);not null" json:"title"` // title 业务字段
|
|
|
|
|
|
Body string `gorm:"column:body;type:text;not null;default:''" json:"body"` // body 业务字段
|
|
|
|
|
|
VersionNo int `gorm:"column:version_no;not null;default:1" json:"version_no"` // version_no 业务字段
|
|
|
|
|
|
PublishStatus string `gorm:"column:publish_status;type:varchar(32);not null;default:'draft'" json:"publish_status"` // publish_status 业务字段
|
2026-07-27 00:18:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-27 15:31:22 +08:00
|
|
|
|
func init() { database.AppendMigrate(&CmsContent{}) }
|
|
|
|
|
|
func (table *CmsContent) TableName() string { return "cms_content" }
|