分类管理
This commit is contained in:
parent
a1a62b3ab7
commit
5c0b6e2e16
|
@ -81,7 +81,7 @@ func GetCategoryById(id uint32) (*Category, error) {
|
|||
|
||||
type CategoryModel struct {
|
||||
Category
|
||||
SubCategory []*CategoryModel
|
||||
SubCategory []*CategoryModel `json:"sub_category" gorm:"-"` //子分类
|
||||
}
|
||||
|
||||
func ScopeOnlyDisplay(db *gorm.DB) *gorm.DB {
|
||||
|
|
|
@ -3120,7 +3120,8 @@ const docTemplate = `{
|
|||
"description": "父分类的编号",
|
||||
"type": "integer"
|
||||
},
|
||||
"subCategory": {
|
||||
"sub_category": {
|
||||
"description": "子分类",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.CategoryModel"
|
||||
|
|
|
@ -3112,7 +3112,8 @@
|
|||
"description": "父分类的编号",
|
||||
"type": "integer"
|
||||
},
|
||||
"subCategory": {
|
||||
"sub_category": {
|
||||
"description": "子分类",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.CategoryModel"
|
||||
|
|
|
@ -237,7 +237,8 @@ definitions:
|
|||
pid:
|
||||
description: 父分类的编号
|
||||
type: integer
|
||||
subCategory:
|
||||
sub_category:
|
||||
description: 子分类
|
||||
items:
|
||||
$ref: '#/definitions/models.CategoryModel'
|
||||
type: array
|
||||
|
|
Loading…
Reference in New Issue
Block a user