You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
421 B
19 lines
421 B
package tables
|
|
|
|
const (
|
|
CategoryStatusPublish = iota + 1 // 发布
|
|
CategoryStatusDraft // 草稿
|
|
)
|
|
|
|
type Category struct {
|
|
Model
|
|
|
|
Name string `gorm:"uniqueIndex" json:"name"`
|
|
Description string `gorm:"" json:"description"`
|
|
ParentID uint `gorm:"index" json:"parent_id"`
|
|
Status int `gorm:"" json:"status"`
|
|
Sorter int `gorm:"index" json:"sorter"`
|
|
|
|
Contents []Content `json:"contents"`
|
|
}
|