调整表结构
This commit is contained in:
@ -1,19 +0,0 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package menu
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"server/api/menu/v1"
|
||||
)
|
||||
|
||||
type IMenuV1 interface {
|
||||
List(ctx context.Context, req *v1.ListReq) (res *v1.ListRes, err error)
|
||||
Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
|
||||
Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
|
||||
Delete(ctx context.Context, req *v1.DeleteReq) (res *v1.DeleteRes, err error)
|
||||
BatchDelete(ctx context.Context, req *v1.BatchDeleteReq) (res *v1.BatchDeleteRes, err error)
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// ListReq 获取菜单列表请求
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/menu" method:"get" tags:"Menu" summary:"(系统管理员)获取菜单列表"`
|
||||
Page int `json:"page" dc:"页数"`
|
||||
Size int `json:"size" dc:"每页数量"`
|
||||
Status int `json:"status" dc:"状态:1=启用,2=禁用"`
|
||||
}
|
||||
|
||||
// ListRes 获取菜单列表响应
|
||||
type ListRes struct {
|
||||
List interface{} `json:"list" dc:"菜单列表"`
|
||||
Total int `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
// CreateReq 创建菜单请求
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/menu" method:"post" tags:"Menu" summary:"(系统管理员)创建菜单"`
|
||||
Name string `json:"name" v:"required" dc:"菜单名称"`
|
||||
ParentId int64 `json:"parent_id" dc:"父级菜单ID"`
|
||||
Path string `json:"path" v:"required" dc:"前端路由路径"`
|
||||
Component string `json:"component" dc:"前端组件路径"`
|
||||
Type int `json:"type" v:"required" dc:"类型:1=目录,2=菜单"`
|
||||
Icon string `json:"icon" dc:"图标"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
Hidden bool `json:"hidden" dc:"是否隐藏:0=显示,1=隐藏"`
|
||||
Status int `json:"status" v:"required" dc:"状态:1=启用,2=禁用"`
|
||||
}
|
||||
|
||||
// CreateRes 创建菜单响应
|
||||
type CreateRes struct {
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
|
||||
// UpdateReq 更新菜单请求
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/menu" method:"put" tags:"Menu" summary:"(系统管理员)更新菜单"`
|
||||
Id int64 `json:"id" v:"required" dc:"菜单ID"`
|
||||
Name string `json:"name" v:"required" dc:"菜单名称"`
|
||||
ParentId int64 `json:"parent_id" dc:"父级菜单ID"`
|
||||
Path string `json:"path" v:"required" dc:"前端路由路径"`
|
||||
Component string `json:"component" dc:"前端组件路径"`
|
||||
Type int `json:"type" v:"required" dc:"类型:1=目录,2=菜单"`
|
||||
Icon string `json:"icon" dc:"图标"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
Hidden bool `json:"hidden" dc:"是否隐藏:0=显示,1=隐藏"`
|
||||
Status int `json:"status" v:"required" dc:"状态:1=启用,2=禁用"`
|
||||
}
|
||||
|
||||
// UpdateRes 更新菜单响应
|
||||
type UpdateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
// DeleteReq 删除菜单请求
|
||||
type DeleteReq struct {
|
||||
g.Meta `path:"/menu/{id}" method:"delete" tags:"Menu" summary:"(系统管理员)删除菜单"`
|
||||
Id int64 `json:"id" v:"required" dc:"菜单ID"`
|
||||
}
|
||||
|
||||
// DeleteRes 删除菜单响应
|
||||
type DeleteRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
// BatchDeleteReq 批量删除菜单请求
|
||||
type BatchDeleteReq struct {
|
||||
g.Meta `path:"/menu" method:"delete" tags:"Menu" summary:"(系统管理员)批量删除菜单"`
|
||||
Ids []int `json:"ids" v:"required" dc:"菜单ID列表"`
|
||||
}
|
||||
|
||||
// BatchDeleteRes 批量删除菜单响应
|
||||
type BatchDeleteRes struct {
|
||||
Ids []int `json:"ids" dc:"返回未删除的 id 数组"`
|
||||
}
|
||||
@ -15,5 +15,4 @@ type IStoreV1 interface {
|
||||
Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
|
||||
Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
|
||||
Delete(ctx context.Context, req *v1.DeleteReq) (res *v1.DeleteRes, err error)
|
||||
BatchDelete(ctx context.Context, req *v1.BatchDeleteReq) (res *v1.BatchDeleteRes, err error)
|
||||
}
|
||||
|
||||
@ -42,7 +42,3 @@ type DeleteReq struct {
|
||||
type DeleteRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
type BatchDeleteReq struct {
|
||||
g.Meta `path:"/store/batch" method:"delete" tags:"Store" summary:"(商户管理员)批量删除门店"`
|
||||
Ids []int `json:"ids" v:"required" dc:"门店ID"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user