完善功能

This commit is contained in:
2025-07-16 15:16:40 +08:00
parent b2871ec0d2
commit f68a5b360b
123 changed files with 4643 additions and 931 deletions

View File

@ -6,41 +6,41 @@ import (
"github.com/gogf/gf/v2/frame/g"
)
type CategoryListReq struct {
g.Meta `path:"/category" tags:"Category" method:"get" summary:"获取分类列表"`
Page int `json:"page" dc:"页码"`
Size int `json:"size" dc:"每页数量"`
Name string `json:"name" dc:"分类名称(模糊搜索)"`
Type int `json:"type" dc:"类型1男频2女频"`
type ListReq struct {
g.Meta `path:"/category" tags:"APP" method:"get" summary:"获取分类列表"`
Page int `json:"page" dc:"页码"`
Size int `json:"size" dc:"每页数量"`
Name string `json:"name" dc:"分类名称(模糊搜索)"`
Channel int `json:"channel" dc:"频道类型1=男频2=女频"`
}
type CategoryListRes struct {
type ListRes struct {
Total int `json:"total" dc:"总数"`
List []model.Category `json:"list" dc:"分类列表"`
}
type CategoryAddReq struct {
g.Meta `path:"/category" tags:"Category" method:"post" summary:"新增分类"`
Name string `json:"name" dc:"分类名称"`
Type int `json:"type" dc:"类型1男频2女频"`
type AddReq struct {
g.Meta `path:"/category" tags:"Backend/Admin" method:"post" summary:"新增分类"`
Name string `json:"name" dc:"分类名称" v:"required"`
Channel int `json:"channel" dc:"频道类型1=男频2=女频" v:"required"`
}
type CategoryAddRes struct {
type AddRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type CategoryEditReq struct {
g.Meta `path:"/category" tags:"Category" method:"put" summary:"编辑分类"`
Id int `json:"id" dc:"分类ID"`
Name string `json:"name" dc:"分类名称"`
Type int `json:"type" dc:"类型1男频2女频"`
type EditReq struct {
g.Meta `path:"/category" tags:"Backend/Admin" method:"put" summary:"编辑分类"`
Id int64 `json:"id" dc:"分类ID" v:"required"`
Name string `json:"name" dc:"分类名称" v:"required"`
Channel int `json:"channel" dc:"频道类型1=男频2=女频" v:"required"`
}
type CategoryEditRes struct {
type EditRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type CategoryDelReq struct {
g.Meta `path:"/category" tags:"Category" method:"delete" summary:"删除分类"`
Id int `json:"id" dc:"分类ID"`
type DelReq struct {
g.Meta `path:"/category" tags:"Backend/Admin" method:"delete" summary:"删除分类"`
Id int64 `json:"id" dc:"分类ID" v:"required"`
}
type CategoryDelRes struct {
type DelRes struct {
Success bool `json:"success" dc:"是否成功"`
}