初始
This commit is contained in:
89
api/v1/system/sys_file.go
Normal file
89
api/v1/system/sys_file.go
Normal file
@ -0,0 +1,89 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2023-07-29 15:32:09
|
||||
// 生成路径: api/v1/system/sys_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"
|
||||
)
|
||||
|
||||
// SysFileSearchReq 分页请求参数
|
||||
type SysFileSearchReq struct {
|
||||
g.Meta `path:"/list" tags:"文件" method:"get" summary:"文件列表"`
|
||||
FileName string `p:"fileName"` //文件名称
|
||||
Status string `p:"status"` //文件状态
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// SysFileSearchRes 列表返回结果
|
||||
type SysFileSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.SysFileListRes `json:"list"`
|
||||
}
|
||||
|
||||
// SysFileAddReq 添加操作请求参数
|
||||
type SysFileAddReq struct {
|
||||
g.Meta `path:"/add" tags:"文件" method:"post" summary:"文件添加"`
|
||||
commonApi.Author
|
||||
ParentId int `p:"parentId" `
|
||||
FileName string `p:"fileName" v:"required#文件名称不能为空"`
|
||||
ProjectId int64 `p:"projectId" `
|
||||
FileTypeId int `p:"fileTypeId" `
|
||||
}
|
||||
|
||||
// SysFileAddRes 添加操作返回结果
|
||||
type SysFileAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// SysFileEditReq 修改操作请求参数
|
||||
type SysFileEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"文件" method:"put" summary:"文件修改"`
|
||||
commonApi.Author
|
||||
FileId int `p:"fileId" v:"required#主键ID不能为空"`
|
||||
ParentId int `p:"parentId" `
|
||||
FileName string `p:"fileName" v:"required#文件名称不能为空"`
|
||||
ProjectId int64 `p:"projectId" `
|
||||
FileTypeId int `p:"fileTypeId" `
|
||||
}
|
||||
|
||||
// SysFileEditRes 修改操作返回结果
|
||||
type SysFileEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// SysFileGetReq 获取一条数据请求
|
||||
type SysFileGetReq struct {
|
||||
g.Meta `path:"/get" tags:"文件" method:"get" summary:"获取文件信息"`
|
||||
commonApi.Author
|
||||
FileId int `p:"fileId" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// SysFileGetRes 获取一条数据结果
|
||||
type SysFileGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.SysFileInfoRes
|
||||
}
|
||||
|
||||
// SysFileDeleteReq 删除数据请求
|
||||
type SysFileDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"文件" method:"delete" summary:"删除文件"`
|
||||
commonApi.Author
|
||||
FileIds []int `p:"fileIds" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// SysFileDeleteRes 删除数据返回
|
||||
type SysFileDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
Reference in New Issue
Block a user