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.
 
 
 

103 lines
3.4 KiB

package v1
import (
"github.com/gogf/gf/v2/frame/g"
"xgit.pub/module/cms/app/model"
"xgit.pub/st52/xcore/dto"
)
// GetTreeReq 获取分类树请求参数
type GetTreeReq struct {
g.Meta `path:"/category/tree" method:"post" summary:"获取树" tags:"分类"`
}
// GetTreeRes 获取分类树返回参数
type GetTreeRes struct {
Data interface{} `json:"data"`
}
// GetListReq 获取分类列表
type GetListReq struct {
g.Meta `path:"/category/list" method:"post" summary:"获取列表" tags:"分类"`
Key string `json:"key"`
dto.PageReq
}
// GetListRes 获取分类列表返回参数
type GetListRes struct {
dto.PageRes
}
// CreateReq 创建分类请求参数
type CreateReq struct {
g.Meta `path:"/category/create" method:"post" summary:"创建" tags:"分类"`
ParentId int `json:"parent_id" description:"父节点"`
Name string `json:"name" description:"分类名字"`
Union string `json:"union" description:"关联"`
Sort int `json:"sort" description:"排序"`
Status int `json:"status" description:"状态"`
SeoTitle string `json:"seo_title" description:""`
SeoKey string `json:"seo_key" description:""`
SeoDes string `json:"seo_des" description:""`
TplIndex string `json:"tpl_index" description:"Index"`
TplList string `json:"tpl_list" description:"GetList"`
TplDetail string `json:"tpl_detail" description:"Detail"`
TplDown string `json:"tpl_down" description:"Down"`
TplPlay string `json:"tpl_play" description:"player"`
model.CategoryExtend
}
// CreateRes 创建分类返回参数
type CreateRes struct{}
// UpdateReq 更新分类请求参数
type UpdateReq struct {
g.Meta `path:"/category/update" method:"post" summary:"更新" tags:"分类"`
Id int `json:"id" description:""`
ParentId int `json:"parent_id" description:"父节点"`
Name string `json:"name" description:"分类名字"`
Union string `json:"union" description:"关联"`
Sort int `json:"sort" description:"排序"`
Status int `json:"status" description:"状态"`
SeoTitle string `json:"seo_title" description:""`
SeoKey string `json:"seo_key" description:""`
SeoDes string `json:"seo_des" description:""`
TplIndex string `json:"tpl_index" description:"Index"`
TplList string `json:"tpl_list" description:"GetList"`
TplDetail string `json:"tpl_detail" description:"Detail"`
TplDown string `json:"tpl_down" description:"Down"`
TplPlay string `json:"tpl_play" description:"player"`
model.CategoryExtend
}
// UpdateRes 更新分类返回参数
type UpdateRes struct{}
// DeleteReq 删除分类请求参数
type DeleteReq struct {
g.Meta `path:"/category/delete" method:"post" summary:"删除" tags:"分类"`
Id uint `json:"id"`
}
// DeleteRes 删除分类返回参数
type DeleteRes struct{}
// BatchDeleteReq 批量删除分类请求参数
type BatchDeleteReq struct {
g.Meta `path:"/category/batch/delete" method:"post" summary:"批量删除" tags:"分类"`
Ids []uint `json:"ids"`
}
// BatchDeleteRes 批量删除分类返回参数
type BatchDeleteRes struct{}
// Drop 交换分类
type Drop struct {
g.Meta `path:"/category/drop" method:"post" summary:"交换" tags:"分类"`
Source int `json:"source"`
Target int `json:"target"`
Action string `json:"action"`
}
// DropRes 交换分类返回参数
type DropRes struct{}