feat: 完善平台总后台模块
This commit is contained in:
16
backend/api/internal/models/cnt_content.go
Normal file
16
backend/api/internal/models/cnt_content.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "git.apinb.com/bsm-sdk/core/database"
|
||||
|
||||
// CntContent 对应 cnt_content,保存公告与协议内容。
|
||||
type CntContent struct {
|
||||
Entity
|
||||
ContentType string `gorm:"column:content_type;type:varchar(32);not null" json:"content_type"`
|
||||
Title string `gorm:"column:title;type:varchar(256);not null" json:"title"`
|
||||
Body string `gorm:"column:body;type:text;not null;default:''" json:"body"`
|
||||
VersionNo int `gorm:"column:version_no;not null;default:1" json:"version_no"`
|
||||
PublishStatus string `gorm:"column:publish_status;type:varchar(32);not null;default:'draft'" json:"publish_status"`
|
||||
}
|
||||
|
||||
func init() { database.AppendMigrate(&CntContent{}) }
|
||||
func (table *CntContent) TableName() string { return "cnt_content" }
|
||||
Reference in New Issue
Block a user