初始
This commit is contained in:
83
api/v1/system/app_menus.go
Normal file
83
api/v1/system/app_menus.go
Normal file
@ -0,0 +1,83 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2024-05-28 15:09:13
|
||||
// 生成路径: api/v1/system/app_menus.go
|
||||
// 生成人:gfast
|
||||
// desc:app菜单相关参数
|
||||
// company:云南奇讯科技有限公司
|
||||
// ==========================================================================
|
||||
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
||||
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
||||
)
|
||||
|
||||
// AppMenusSearchReq 分页请求参数
|
||||
type AppMenusSearchReq struct {
|
||||
g.Meta `path:"/list" tags:"app菜单" method:"get" summary:"app菜单列表"`
|
||||
MenuId string `p:"menuId"` //
|
||||
MenuName string `p:"menuName"` //菜单名
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// AppMenusSearchRes 列表返回结果
|
||||
type AppMenusSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.AppMenusListRes `json:"list"`
|
||||
}
|
||||
|
||||
// AppMenusAddReq 添加操作请求参数
|
||||
type AppMenusAddReq struct {
|
||||
g.Meta `path:"/add" tags:"app菜单" method:"post" summary:"app菜单添加"`
|
||||
commonApi.Author
|
||||
MenuName string `p:"menuName" v:"required#菜单名不能为空"`
|
||||
}
|
||||
|
||||
// AppMenusAddRes 添加操作返回结果
|
||||
type AppMenusAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// AppMenusEditReq 修改操作请求参数
|
||||
type AppMenusEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"app菜单" method:"put" summary:"app菜单修改"`
|
||||
commonApi.Author
|
||||
MenuId uint `p:"menuId" v:"required#主键ID不能为空"`
|
||||
MenuName string `p:"menuName" v:"required#菜单名不能为空"`
|
||||
}
|
||||
|
||||
// AppMenusEditRes 修改操作返回结果
|
||||
type AppMenusEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// AppMenusGetReq 获取一条数据请求
|
||||
type AppMenusGetReq struct {
|
||||
g.Meta `path:"/get" tags:"app菜单" method:"get" summary:"获取app菜单信息"`
|
||||
commonApi.Author
|
||||
MenuId uint `p:"menuId" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// AppMenusGetRes 获取一条数据结果
|
||||
type AppMenusGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.AppMenusInfoRes
|
||||
}
|
||||
|
||||
// AppMenusDeleteReq 删除数据请求
|
||||
type AppMenusDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"app菜单" method:"delete" summary:"删除app菜单"`
|
||||
commonApi.Author
|
||||
MenuIds []uint `p:"menuIds" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// AppMenusDeleteRes 删除数据返回
|
||||
type AppMenusDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
Reference in New Issue
Block a user