202 lines
7.6 KiB
Go
202 lines
7.6 KiB
Go
// ==========================================================================
|
||
// GFast自动生成api操作代码。
|
||
// 生成日期:2023-09-16 10:32:04
|
||
// 生成路径: api/v1/system/document.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"
|
||
)
|
||
|
||
type SendFileReq struct {
|
||
g.Meta `path:"/sendFile" tags:"工程资料>模板" method:"post" summary:"获取web365的在线阅读"`
|
||
commonApi.Author
|
||
FilePath string `p:"filePath" dc:"文件相对路径" v:"required#文件相对路径不能为空"`
|
||
FileType string `p:"fileType" dc:"文件类型(1word 2excel 3ppt)" v:"required#文件类型不能为空"`
|
||
}
|
||
|
||
type SendFileRes struct {
|
||
commonApi.EmptyRes
|
||
FilePath string `p:"filePath" dc:"文件相对路径"`
|
||
}
|
||
|
||
// DocumentSearchReq 分页请求参数
|
||
type DocumentSearchReq struct {
|
||
g.Meta `path:"/list" tags:"工程资料>模板" method:"get" summary:"母板列表"`
|
||
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
|
||
}
|
||
|
||
// DocumentSearchRes 列表返回结果
|
||
type DocumentSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.DocumentListRes `json:"list"`
|
||
}
|
||
|
||
// AllDocumentSearchReq 获取所有数据
|
||
type AllDocumentSearchReq struct {
|
||
g.Meta `path:"/allList" tags:"工程资料>模板" method:"get" summary:"获取所有数据"`
|
||
Type string `p:"type" dc:"1未删除的全部 2删除的全部 3全部(删除+未删除)" v:"between:1,2#范围值为1~2"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// AllDocumentSearchRes 获取所有数据
|
||
type AllDocumentSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.DocumentInfoRes `json:"list"`
|
||
}
|
||
|
||
// DocumentAddReq 添加操作请求参数
|
||
type DocumentAddReq struct {
|
||
g.Meta `path:"/add" tags:"工程资料>模板" method:"post" summary:"本地导入(文件/压缩文件夹)"`
|
||
commonApi.Author
|
||
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#需要填写文件夹名称"`
|
||
}
|
||
|
||
// DocumentAddRes 添加操作返回结果
|
||
type DocumentAddRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// NewFolderReq 添加操作请求参数
|
||
type NewFolderReq struct {
|
||
g.Meta `path:"/newFolder" tags:"工程资料>模板" method:"post" summary:"新建文件夹"`
|
||
commonApi.Author
|
||
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#需要填写文件夹名称"`
|
||
}
|
||
|
||
// NewFolderRes 添加操作返回结果
|
||
type NewFolderRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// DocumentEditReq 修改操作请求参数
|
||
type DocumentEditReq 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"`
|
||
}
|
||
|
||
// DocumentEditRes 修改操作返回结果
|
||
type DocumentEditRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// DocumentGetReq 获取一条数据请求
|
||
type DocumentGetReq struct {
|
||
g.Meta `path:"/get" tags:"工程资料>模板" method:"get" summary:"获取母板信息"`
|
||
commonApi.Author
|
||
Id int `p:"id" v:"required#主键必须"` //通过主键获取
|
||
}
|
||
|
||
// DocumentGetRes 获取一条数据结果
|
||
type DocumentGetRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.DocumentInfoRes
|
||
}
|
||
|
||
// GetFileNameByDateReq 获取一条数据请求
|
||
type GetFileNameByDateReq struct {
|
||
g.Meta `path:"/getFileNameByDate" tags:"工程资料>模板" method:"get" summary:"废弃"`
|
||
commonApi.Author
|
||
FileName string `p:"fileName" dc:"文件名称" v:"required#文件名称为必须"`
|
||
Id int64 `p:"id" dc:"文件名称" v:"required#文件名称为必须"`
|
||
}
|
||
|
||
// DocumentDeleteReq 删除数据请求
|
||
type DocumentDeleteReq struct {
|
||
g.Meta `path:"/delete" tags:"工程资料>模板" method:"delete" summary:"删除母板"`
|
||
commonApi.Author
|
||
Ids []int `p:"ids" v:"required#主键必须"` //通过主键删除
|
||
}
|
||
|
||
// DocumentDeleteRes 删除数据返回
|
||
type DocumentDeleteRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// TreeStructureReq 树形结构文件夹目录
|
||
type TreeStructureReq struct {
|
||
g.Meta `path:"/treeStructure" tags:"工程资料>模板" method:"get" summary:"树形结构文件夹目录"`
|
||
//ProjectId string `p:"projectId" dc:"项目id" v:"required#项目ID不能为空"`
|
||
//IdStr string `p:"idStr" dc:"父级标识" v:"required#父级标识不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// TreeStructureRes 树形结构文件夹目录
|
||
type TreeStructureRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
List []*model.TreeStructureRes `json:"list"`
|
||
}
|
||
|
||
// CompressedDownloadReq 根据文件夹路径(相对路径)下载当前目录及以下文件、文件夹
|
||
type CompressedDownloadReq struct {
|
||
g.Meta `path:"/compressedDownload" tags:"工程资料>模板" method:"get" summary:"根据文件夹路径(相对路径)下载当前目录及以下文件、文件夹"`
|
||
RelativePath string `p:"relativePath" dc:"相对路径" v:"required#相对路径不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// CompressedDownloadRes 根据文件夹路径(相对路径)下载当前目录及以下文件、文件夹
|
||
type CompressedDownloadRes struct {
|
||
commonApi.EmptyRes
|
||
RelativePath string `p:"relativePath" dc:"相对路径" v:"required#相对路径不能为空"`
|
||
}
|
||
|
||
// TemplateRecycleBinReq 模板回收站
|
||
type TemplateRecycleBinReq struct {
|
||
g.Meta `path:"/templateRecycleBin" tags:"工程资料>模板" method:"put" summary:"模板回收站"`
|
||
commonApi.Author
|
||
Ids []int64 `p:"ids" v:"required#主键ID不能为空"`
|
||
Type string `p:"type" dc:"1恢复 2删除" v:"between:1,2#范围值为1~2"`
|
||
}
|
||
|
||
// TemplateRecycleBinRes 模板回收站
|
||
type TemplateRecycleBinRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// WriteFreelyReq a
|
||
type WriteFreelyReq struct {
|
||
g.Meta `path:"/complaintBoxAddTwo" tags:"工程资料>模板" method:"post" summary:"畅写回调保存"`
|
||
Path string `p:"path" dc:"路径" v:"required#文件保存路径不能为空"`
|
||
}
|
||
|
||
// WriteFreelyRes a
|
||
type WriteFreelyRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// UniFileDownloadReq 单文件下载
|
||
type UniFileDownloadReq struct {
|
||
g.Meta `path:"/uniFileDownload" tags:"工程资料>模板" method:"get" summary:"单文件下载"`
|
||
RelativePath string `p:"relativePath" dc:"相对路径" v:"required#相对路径不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// UniFileDownloadRes 单文件下载
|
||
type UniFileDownloadRes struct {
|
||
commonApi.EmptyRes
|
||
}
|