初始
This commit is contained in:
202
api/v1/system/document_completion.go
Normal file
202
api/v1/system/document_completion.go
Normal file
@ -0,0 +1,202 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2024-03-15 10:25:00
|
||||
// 生成路径: api/v1/system/document_completion.go
|
||||
// 生成人:gfast
|
||||
// desc:竣工图相关参数
|
||||
// company:云南奇讯科技有限公司
|
||||
// ==========================================================================
|
||||
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
||||
comModel "github.com/tiger1103/gfast/v3/internal/app/common/model"
|
||||
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
||||
)
|
||||
|
||||
// qSearchReq 分页请求参数
|
||||
type DocumentCompletionSearchReq struct {
|
||||
g.Meta `path:"/list" tags:"竣工图" method:"get" summary:"竣工图列表"`
|
||||
Id string `p:"id"` //
|
||||
IdStr string `p:"idStr"` //模板id
|
||||
Pid string `p:"pid"` //父级(0代表顶级)
|
||||
Name string `p:"name"` //模板名称
|
||||
FilenPath string `p:"filenPath"` //模板文件名
|
||||
Type string `p:"type"` //类型(1文件-2文件夹)
|
||||
Suffix string `p:"suffix"` //后缀
|
||||
CreateBy string `p:"createBy"` //创建人
|
||||
UpdateBy string `p:"updateBy"` //更新人
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||||
ProjectId string `p:"projectId" v:"projectId@integer#项目id需为整数"` //项目id
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// DocumentCompletionSearchRes 列表返回结果
|
||||
type DocumentCompletionSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.DocumentCompletionListRes `json:"list"`
|
||||
}
|
||||
|
||||
// DocumentCompletionAddReq 添加操作请求参数
|
||||
type DocumentCompletionAddReq struct {
|
||||
g.Meta `path:"/add" tags:"竣工图" method:"post" summary:"竣工图添加"`
|
||||
commonApi.Author
|
||||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||||
Pid string `p:"pid" dc:"父级文件夹(如果需要在某个文件夹下导入,那么需要有此参数)" `
|
||||
FileType string `p:"fileType" dc:"1上传压缩文件夹 2上传文件" v:"between:1,2#范围值为1~2"`
|
||||
FilePath *comModel.UpFile `p:"filePath" dc:"fileType为1上传压缩文件夹 2文件" v:"required-if:fileType,1#需要上传压缩文件夹"`
|
||||
//FileName string `p:"fileName" dc:"fileType为3填写文件夹名" v:"required-if:fileType,3#需要填写文件夹名称"`
|
||||
}
|
||||
|
||||
// DocumentCompletionAddRes 添加操作返回结果
|
||||
type DocumentCompletionAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// DocumentCompletionEditReq 修改操作请求参数
|
||||
type DocumentCompletionEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"竣工图" method:"put" summary:"重命名(文件/文件夹)"`
|
||||
commonApi.Author
|
||||
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
||||
Name string `p:"name" dc:"名" v:"required#模板名称不能为空"`
|
||||
Type string `p:"type" dc:"1文件 2文件夹" v:"between:1,2#范围值为1~2"`
|
||||
}
|
||||
|
||||
// DocumentCompletionEditRes 修改操作返回结果
|
||||
type DocumentCompletionEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// DocumentCompletionGetReq 获取一条数据请求
|
||||
type DocumentCompletionGetReq struct {
|
||||
g.Meta `path:"/get" tags:"竣工图" method:"get" summary:"获取竣工图信息"`
|
||||
commonApi.Author
|
||||
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// DocumentCompletionGetRes 获取一条数据结果
|
||||
type DocumentCompletionGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
List []*model.SelectTabNameAndTabIdByDateRes `p:"list"`
|
||||
}
|
||||
|
||||
// DocumentCompletionDeleteReq 删除数据请求
|
||||
type DocumentCompletionDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"竣工图" method:"delete" summary:"删除竣工图"`
|
||||
commonApi.Author
|
||||
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// DocumentCompletionDeleteRes 删除数据返回
|
||||
type DocumentCompletionDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// CompletionNewFolderDataReq 新建文件夹
|
||||
type CompletionNewFolderDataReq struct {
|
||||
g.Meta `path:"/newFolder" tags:"竣工图" method:"post" summary:"新建文件夹"`
|
||||
commonApi.Author
|
||||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||||
Pid string `p:"pid" dc:"父级文件夹(如果需要在某个文件夹下导入,那么需要有此参数)" `
|
||||
//FileType string `p:"fileType" dc:"1上传压缩文件夹 2上传文件 3新建文件夹" v:"between:1,3#范围值为1~3"`
|
||||
FilePath *comModel.UpFile `p:"filePath" dc:"fileType为1上传压缩文件夹 2文件" v:"required-if:fileType,1#需要上传压缩文件夹"`
|
||||
FileName string `p:"fileName" dc:"fileType为3填写文件夹名" v:"required-if:fileType,3#需要填写文件夹名称"`
|
||||
}
|
||||
|
||||
// CompletionNewFolderDataRes 新建文件夹
|
||||
type CompletionNewFolderDataRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// CompletionDataUniFileDownloadReq 单文件下载
|
||||
type CompletionDataUniFileDownloadReq struct {
|
||||
g.Meta `path:"/uniFileDownload" tags:"竣工图" method:"get" summary:"单文件下载"`
|
||||
RelativePath string `p:"relativePath" dc:"相对路径" v:"required#相对路径不能为空"`
|
||||
Type string `p:"type" dc:"1文件下载 2文件夹下载" v:"required#type不能为空"`
|
||||
TableName string `p:"tableName" dc:"1竣工 2施工 3可研" v:"between:1,3#取值范围为1~3"`
|
||||
TableId int64 `p:"tableId" dc:"对应TableName的主键ID" v:"required#tableId不能为空"`
|
||||
ProjectId int64 `p:"projectId" dc:"项目ID" v:"required#projectId不能为空"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// CompletionDataUniFileDownloadRes 单文件下载
|
||||
type CompletionDataUniFileDownloadRes struct {
|
||||
commonApi.EmptyRes
|
||||
Path string `p:"path" dc:"文件夹压缩包下载路径"`
|
||||
}
|
||||
|
||||
// DocumentTreeStructureReq 树形结构
|
||||
type DocumentTreeStructureReq struct {
|
||||
g.Meta `path:"/treeStructure" tags:"竣工图" method:"get" summary:"树形结构"`
|
||||
ProjectId string `p:"projectId" v:"projectId@integer#项目id需为整数"` //项目id
|
||||
Pid string `p:"pid"` //父级(0代表顶级)
|
||||
//Name string `p:"name"` //模板名称
|
||||
//Suffix string `p:"suffix"` //后缀
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// DocumentTreeStructureRes 树形结构
|
||||
type DocumentTreeStructureRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
List []*model.DocumentCompletionListRes `json:"list"`
|
||||
}
|
||||
|
||||
// SelectByPidReq 获取pid
|
||||
type SelectByPidReq struct {
|
||||
g.Meta `path:"/selectByPid" tags:"竣工图" method:"get" summary:"获取pid"`
|
||||
ProjectId string `p:"projectId" v:"projectId@integer#项目id需为整数"`
|
||||
PathName string `p:"pathName" dc:"路径地址(例子:/xxxx/xxxx)" v:"required#路径地址不能为空"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// SelectByPidRes 获取pid
|
||||
type SelectByPidRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Pid string `p:"pid" dc:"pid"`
|
||||
}
|
||||
|
||||
// CompletionDataRecyclingStationReq 回收站
|
||||
type CompletionDataRecyclingStationReq struct {
|
||||
g.Meta `path:"/completionDataRecyclingStation" tags:"竣工图" method:"put" summary:"回收站恢复及删除(删除已被注释)"`
|
||||
commonApi.Author
|
||||
Ids []int64 `p:"ids" v:"required#主键ID不能为空"`
|
||||
//Type string `p:"type" dc:"1恢复 2删除" v:"between:1,1#范围值为1"`
|
||||
Type string `p:"type" dc:"1恢复" `
|
||||
}
|
||||
|
||||
// CompletionDataRecyclingStationRes 回收站
|
||||
type CompletionDataRecyclingStationRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// RecycleBinListReq 不分页请求参数
|
||||
type RecycleBinListReq struct {
|
||||
g.Meta `path:"/recycleBinList" tags:"竣工图" method:"get" summary:"回收站数据加载"`
|
||||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||||
Type string `p:"type" dc:"1未删除的全部 2删除的全部 3全部(删除+未删除)" v:"between:1,3#范围值为1~3"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// RecycleBinListRes 不分页请求参数
|
||||
type RecycleBinListRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
List []*model.DocumentCompletionInfoRes `json:"list"`
|
||||
}
|
||||
|
||||
// AuditDataListReq 审核数据列表
|
||||
type AuditDataListReq struct {
|
||||
g.Meta `path:"/auditDataList" tags:"竣工图" method:"get" summary:"审核数据列表"`
|
||||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||||
Type string `p:"type" dc:"1未删除的全部 2删除的全部 3全部(删除+未删除)" v:"between:1,3#范围值为1~3"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// AuditDataListRes 审核数据列表
|
||||
type AuditDataListRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
List []*model.DocumentCompletionInfoRes `json:"list"`
|
||||
}
|
Reference in New Issue
Block a user