实现文章与分组管理
This commit is contained in:
20
web/models/article_group.go
Normal file
20
web/models/article_group.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import "platform/web/core"
|
||||
|
||||
// ArticleGroup 文章分组表
|
||||
type ArticleGroup struct {
|
||||
core.Model
|
||||
Name string `json:"name" gorm:"column:name"` // 分组名称
|
||||
Code string `json:"code" gorm:"column:code"` // 分组编码
|
||||
Sort int32 `json:"sort" gorm:"column:sort"` // 分组排序
|
||||
Status ArticleGroupStatus `json:"status" gorm:"column:status"` // 分组状态:0-禁用,1-正常
|
||||
}
|
||||
|
||||
// ArticleGroupStatus 分组状态
|
||||
type ArticleGroupStatus int
|
||||
|
||||
const (
|
||||
ArticleGroupStatusDisabled ArticleGroupStatus = 0 // 禁用
|
||||
ArticleGroupStatusEnabled ArticleGroupStatus = 1 // 正常
|
||||
)
|
||||
Reference in New Issue
Block a user