初始
This commit is contained in:
104
api/v1/system/bus_folder.go
Normal file
104
api/v1/system/bus_folder.go
Normal file
@ -0,0 +1,104 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2023-09-15 17:15:59
|
||||
// 生成路径: api/v1/system/bus_folder.go
|
||||
// 生成人:gfast
|
||||
// desc:文件夹相关参数
|
||||
// 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"
|
||||
)
|
||||
|
||||
// BusFolderSearchReq 分页请求参数
|
||||
type BusFolderSearchReq struct {
|
||||
g.Meta `path:"/list" tags:"文件夹" method:"get" summary:"文件夹列表"`
|
||||
TypeNum int64 `p:"typeNum" dc:"类型:1查所有父文件夹 2查询子文件夹" v:"between:1,2#参数范围为1~2"`
|
||||
FatherId string `p:"fatherId" dc:"typeNum为2,此字段不能为空" v:"required-if:typeNum,2#typeNum为2fatherId不能为空"`
|
||||
Name string `p:"name"` //文件夹名称
|
||||
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// BusFolderSearchRes 列表返回结果
|
||||
type BusFolderSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.BusFolderListRes `json:"list"`
|
||||
}
|
||||
|
||||
// TreeFormListFuncReq 树形文件夹列表
|
||||
type TreeFormListFuncReq struct {
|
||||
g.Meta `path:"/treeFormListFunc" tags:"文件夹" method:"get" summary:"系统文件夹的虚拟树形结构"`
|
||||
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式""` //创建时间
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// TreeFormListFuncRes 列表返回结果
|
||||
type TreeFormListFuncRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
List []*model.BusFolderListRes `json:"list"`
|
||||
}
|
||||
|
||||
// BusFolderAddReq 添加操作请求参数
|
||||
type BusFolderAddReq struct {
|
||||
g.Meta `path:"/add" tags:"文件夹" method:"post" summary:"文件夹添加"`
|
||||
commonApi.Author
|
||||
Icon string `p:"icon" `
|
||||
Name string `p:"name" v:"required#文件夹名称不能为空"`
|
||||
Remark string `p:"remark" `
|
||||
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
||||
}
|
||||
|
||||
// BusFolderAddRes 添加操作返回结果
|
||||
type BusFolderAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// BusFolderEditReq 修改操作请求参数
|
||||
type BusFolderEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"文件夹" method:"put" summary:"文件夹修改"`
|
||||
commonApi.Author
|
||||
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
||||
Icon string `p:"icon" `
|
||||
Name string `p:"name" v:"required#文件夹名称不能为空"`
|
||||
Remark string `p:"remark" `
|
||||
}
|
||||
|
||||
// BusFolderEditRes 修改操作返回结果
|
||||
type BusFolderEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// BusFolderGetReq 获取一条数据请求
|
||||
type BusFolderGetReq struct {
|
||||
g.Meta `path:"/get" tags:"文件夹" method:"get" summary:"获取文件夹信息"`
|
||||
commonApi.Author
|
||||
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// BusFolderGetRes 获取一条数据结果
|
||||
type BusFolderGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.BusFolderInfoRes
|
||||
}
|
||||
|
||||
// BusFolderDeleteReq 删除数据请求
|
||||
type BusFolderDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"文件夹" method:"delete" summary:"删除文件夹"`
|
||||
commonApi.Author
|
||||
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// BusFolderDeleteRes 删除数据返回
|
||||
type BusFolderDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
Reference in New Issue
Block a user