232 lines
9.7 KiB
Go
232 lines
9.7 KiB
Go
// ==========================================================================
|
||
// GFast自动生成api操作代码。
|
||
// 生成日期:2023-12-27 09:30:03
|
||
// 生成路径: api/v1/system/document_data.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"
|
||
)
|
||
|
||
// DocumentDataSearchReq 分页请求参数
|
||
type DocumentDataSearchReq struct {
|
||
g.Meta `path:"/list" tags:"工程资料>资料" method:"get" summary:"工程资料>资料列表"`
|
||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||
Switch string `p:"switch" dc:"当前文件夹及以下(1)/当前文件夹(2)" v:"between:1,2#仅支持传递1~2"`
|
||
IdStr string `p:"idStr" dc:"模板标识" v:"required#模板标识不能为空"`
|
||
Name string `p:"name" dc:"模板名称"`
|
||
commonApi.Paging
|
||
commonApi.PageReq
|
||
commonApi.Author
|
||
}
|
||
|
||
// DocumentDataSearchRes 列表返回结果
|
||
type DocumentDataSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.DocumentDataListRes `json:"list"`
|
||
}
|
||
|
||
// AllDocumentDataSearchReq 不分页请求参数
|
||
type AllDocumentDataSearchReq struct {
|
||
g.Meta `path:"/allList" 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
|
||
}
|
||
|
||
// AllDocumentDataSearchRes 不分页请求参数
|
||
type AllDocumentDataSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
List []*model.DocumentDataInfoRes `json:"list"`
|
||
}
|
||
|
||
// DocumentDataAddReq 本地导入(文件/压缩文件夹)
|
||
type DocumentDataAddReq 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#需要填写文件夹名称"`
|
||
}
|
||
|
||
// DocumentDataAddRes 本地导入(文件/压缩文件夹)
|
||
type DocumentDataAddRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// NewFolderDataReq 新建文件夹
|
||
type NewFolderDataReq 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#需要填写文件夹名称"`
|
||
}
|
||
|
||
// NewFolderDataRes 新建文件夹
|
||
type NewFolderDataRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// DocumentDataEditReq 修改操作请求参数
|
||
type DocumentDataEditReq 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"`
|
||
}
|
||
|
||
// DocumentDataEditRes 修改操作返回结果
|
||
type DocumentDataEditRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// DocumentDataGetReq 获取一条数据请求
|
||
type DocumentDataGetReq struct {
|
||
g.Meta `path:"/get" tags:"工程资料>资料" method:"get" summary:"获取工程资料>资料信息"`
|
||
commonApi.Author
|
||
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||
}
|
||
|
||
// DocumentDataGetRes 获取一条数据结果
|
||
type DocumentDataGetRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.DocumentDataInfoRes
|
||
}
|
||
|
||
// DocumentDataDeleteReq 删除数据请求
|
||
type DocumentDataDeleteReq struct {
|
||
g.Meta `path:"/delete" tags:"工程资料>资料" method:"delete" summary:"删除工程资料>资料"`
|
||
commonApi.Author
|
||
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||
}
|
||
|
||
// DocumentDataDeleteRes 删除数据返回
|
||
type DocumentDataDeleteRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// TreeStructureDataReq 树形结构文件夹目录
|
||
type TreeStructureDataReq struct {
|
||
g.Meta `path:"/treeStructureData" tags:"工程资料>资料" method:"get" summary:"树形结构文件夹目录"`
|
||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// TreeStructureDataRes 树形结构文件夹目录
|
||
type TreeStructureDataRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
List []*model.TreeStructureDataRes `json:"list"`
|
||
}
|
||
|
||
// OnlineImportReq 在线模板导入|复制(复制文件或文件夹)
|
||
type OnlineImportReq struct {
|
||
g.Meta `path:"/onlineImport" tags:"工程资料>资料" method:"put" summary:"在线模板导入|复制(复制文件或文件夹)"`
|
||
commonApi.Author
|
||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||
Type string `p:"type" dc:"1模板文件 2模板文件夹" v:"between:1,4#范围值为1~4"`
|
||
TemplateId []string `p:"TemplateId" dc:"模板主键ID" v:"required#模板主键ID不能为空"`
|
||
DataId string `p:"DataId" dc:"资料主键ID" v:"required#资料主键ID不能为空"`
|
||
}
|
||
|
||
// OnlineImportRes 在线模板导入|复制(复制文件或文件夹)
|
||
type OnlineImportRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// OnlineMobileReq 在线资料导入|移动(移动文件或文件夹)
|
||
type OnlineMobileReq struct {
|
||
g.Meta `path:"/onlineMobile" tags:"工程资料>资料" method:"put" summary:"在线资料导入|移动(移动文件或文件夹)"`
|
||
commonApi.Author
|
||
ProjectId int64 `p:"projectId" v:"required#项目ID不能为空"`
|
||
Type string `p:"type" dc:"1资料文件 2资料文件夹" v:"between:1,2#范围值为1~2"`
|
||
TemplateId string `p:"TemplateId" dc:"被移动文件/文件夹(主键ID)" v:"required#模板主键ID不能为空"`
|
||
DataId string `p:"DataId" dc:"移动到哪儿(主键ID)" v:"required#资料主键ID不能为空"`
|
||
}
|
||
|
||
// OnlineMobileRes 在线资料导入|移动(移动文件或文件夹)
|
||
type OnlineMobileRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// DataRecyclingStationReq 资料回收站
|
||
type DataRecyclingStationReq struct {
|
||
g.Meta `path:"/dataRecyclingStation" 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恢复" `
|
||
}
|
||
|
||
// DataRecyclingStationRes 资料回收站
|
||
type DataRecyclingStationRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// DataWriteFreelyReq 畅写回调保存
|
||
type DataWriteFreelyReq struct {
|
||
g.Meta `path:"/complaintBoxAdd" tags:"工程资料>资料" method:"post" summary:"畅写回调保存"`
|
||
Path string `p:"path" dc:"路径" v:"required#文件保存路径不能为空"`
|
||
}
|
||
|
||
// DataFileQueryReq 资料查询(查询资料里面的所有文件,限制格式为ppt、excel、word)
|
||
type DataFileQueryReq struct {
|
||
g.Meta `path:"/dataFileQuery" tags:"工程资料>资料" method:"get" summary:"资料文件模糊查询(查询资料里面的所有文件,限制文件为ppt、excel、word)"`
|
||
Project int64 `p:"project" dc:"项目id" `
|
||
FileName string `p:"fileName" dc:"文件名称查询(模糊查询)"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// DataFileQueryRes 资料查询(查询资料里面的所有文件,限制格式为ppt、excel、word)
|
||
type DataFileQueryRes struct {
|
||
commonApi.EmptyRes
|
||
List []*model.DocumentDataListTwoRes `json:"list"`
|
||
}
|
||
|
||
// DataCompressedDownloadReq 根据文件夹路径(相对路径)下载当前目录及以下文件、文件夹
|
||
type DataCompressedDownloadReq struct {
|
||
g.Meta `path:"/dataCompressedDownload" tags:"工程资料>资料" method:"get" summary:"根据文件夹路径(相对路径)下载当前目录及以下文件、文件夹"`
|
||
RelativePath string `p:"relativePath" dc:"相对路径" v:"required#相对路径不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// DataUniFileDownloadReq 单文件下载
|
||
type DataUniFileDownloadReq struct {
|
||
g.Meta `path:"/uniFileDownload" tags:"工程资料>资料" method:"get" summary:"单文件下载"`
|
||
RelativePath string `p:"relativePath" dc:"相对路径" v:"required#相对路径不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// DataUniFileDownloadRes 单文件下载
|
||
type DataUniFileDownloadRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// SonFileReq 获取文件夹下的子文件
|
||
type SonFileReq struct {
|
||
g.Meta `path:"/sonFile" tags:"工程资料>资料" method:"get" summary:"获取文件夹下的子文件"`
|
||
Project int64 `p:"project" dc:"项目id" `
|
||
IdStr string `p:"idStr" dc:"父文件夹唯一标识" v:"required#父文件夹唯一标识不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// SonFileRes 获取文件夹下的子文件
|
||
type SonFileRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
List []*model.DocumentDataInfoRes `json:"list"`
|
||
}
|