初始化项目框架,完成部分接口开发

This commit is contained in:
2025-07-10 21:04:29 +08:00
commit b2871ec0d2
168 changed files with 6399 additions and 0 deletions

View File

@ -0,0 +1,46 @@
package v1
import (
"server/internal/model"
"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 CategoryListRes 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 CategoryAddRes 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 CategoryEditRes 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 CategoryDelRes struct {
Success bool `json:"success" dc:"是否成功"`
}