97 lines
3.8 KiB
Go
97 lines
3.8 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2023-09-15 17:16:00
|
|||
|
// 生成路径: api/v1/system/bus_folder_file.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"
|
|||
|
)
|
|||
|
|
|||
|
// BusFolderFileSearchReq 分页请求参数
|
|||
|
type BusFolderFileSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"文件" method:"get" summary:"文件列表1"`
|
|||
|
FolderId string `p:"folderId"` //文件ID
|
|||
|
Name string `p:"name"` //文件名称
|
|||
|
Size string `p:"size"` //文件大小
|
|||
|
Suffix string `p:"suffix"` //文件后缀
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式" dc:"创建时间-格式为:年月日时分秒"` //创建时间
|
|||
|
CreateAt string `p:"createAt" v:"createAt@date-format:Y-m#创建时间需为YYYY-MM" dc:"创建时间-格式为:年月"` //创建时间
|
|||
|
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileSearchRes 列表返回结果
|
|||
|
type BusFolderFileSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.BusFolderFileListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileAddReq 添加操作请求参数
|
|||
|
type BusFolderFileAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"文件" method:"post" summary:"文件添加"`
|
|||
|
commonApi.Author
|
|||
|
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
|||
|
FolderId int64 `p:"folderId" dc:"所属文件夹" v:"required#所属文件夹不能为空"`
|
|||
|
Name string `p:"name" dc:"文件名" v:"required#文件名称不能为空"`
|
|||
|
Size string `p:"size" dc:"文件大小" v:"required#文件大小不能为空"`
|
|||
|
Suffix string `p:"suffix" dc:"文件后缀" v:"required#文件后缀不能为空"`
|
|||
|
Path string `p:"path" dc:"文件路径" v:"required#文件路径不能为空"`
|
|||
|
Remark string `p:"remark" dc:"备注" `
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileAddRes 添加操作返回结果
|
|||
|
type BusFolderFileAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileEditReq 修改操作请求参数
|
|||
|
type BusFolderFileEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"文件" method:"put" summary:"文件修改"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
|||
|
FolderId int64 `p:"folderId" `
|
|||
|
FileType string `p:"fileType" `
|
|||
|
Name string `p:"name" v:"required#文件名称不能为空"`
|
|||
|
Remark string `p:"remark" `
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileEditRes 修改操作返回结果
|
|||
|
type BusFolderFileEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileGetReq 获取一条数据请求
|
|||
|
type BusFolderFileGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"文件" method:"get" summary:"获取文件信息"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileGetRes 获取一条数据结果
|
|||
|
type BusFolderFileGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.BusFolderFileInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileDeleteReq 删除数据请求
|
|||
|
type BusFolderFileDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"文件" method:"delete" summary:"删除文件"`
|
|||
|
commonApi.Author
|
|||
|
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// BusFolderFileDeleteRes 删除数据返回
|
|||
|
type BusFolderFileDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|