添加获取所有分类以及分类按层级显示的逻辑
This commit is contained in:
1 parent
fc259ba274
commit
e42a4549e9
4 files changed
+60
-6
No files matched your search
@@ -7,12 +7,13 @@ import (
|
||||
type Category struct {
|
||||
models.Model
|
||||
|
||||
Title string `json:"title" gorm:"type:varchar(127);comment:标题"`
|
||||
Slug string `json:"slug" gorm:"type:varchar(127);comment:id"`
|
||||
Desc string `json:"desc" gorm:"type:varchar(127);comment:描述"`
|
||||
Parent string `json:"parent" gorm:"type:bigint;comment:父"`
|
||||
Order string `json:"order" gorm:"type:bigint;comment:排序"`
|
||||
Status string `json:"status" gorm:"type:int;comment:状态"`
|
||||
Title string `json:"title" gorm:"type:varchar(127);comment:标题"`
|
||||
Slug string `json:"slug" gorm:"type:varchar(127);comment:id"`
|
||||
Desc string `json:"desc" gorm:"type:varchar(127);comment:描述"`
|
||||
Parent string `json:"-" gorm:"type:bigint;comment:父"`
|
||||
Order string `json:"order" gorm:"type:bigint;comment:排序"`
|
||||
Status string `json:"status" gorm:"type:int;comment:状态"`
|
||||
Children []Category `json:"children" gorm:"-"`
|
||||
models.ModelTime
|
||||
models.ControlBy
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user