Files
zmkgC/api/v1/system/document_report.go
2025-07-07 20:11:59 +08:00

196 lines
8.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2024-03-15 10:24:21
// 生成路径: api/v1/system/document_report.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"
)
// DocumentReportSearchReq 分页请求参数
type DocumentReportSearchReq 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
}
// DocumentReportSearchRes 列表返回结果
type DocumentReportSearchRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.DocumentReportListRes `json:"list"`
}
// DocumentReportAddReq 添加操作请求参数
type DocumentReportAddReq 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#需要填写文件夹名称"`
}
// DocumentReportAddRes 添加操作返回结果
type DocumentReportAddRes struct {
commonApi.EmptyRes
}
// DocumentReportEditReq 修改操作请求参数
type DocumentReportEditReq struct {
g.Meta `path:"/edit" tags:"科研及专题报告" method:"put" summary:"科研及专题报告修改"`
commonApi.Author
Id int64 `p:"id" v:"required#主键ID不能为空"`
IdStr string `p:"idStr" `
Pid string `p:"pid" `
Name string `p:"name" v:"required#模板名称不能为空"`
FilenPath string `p:"filenPath" `
Type string `p:"type" `
Suffix string `p:"suffix" `
CreateBy string `p:"createBy" `
UpdateBy string `p:"updateBy" `
ProjectId int64 `p:"projectId" `
}
// DocumentReportEditRes 修改操作返回结果
type DocumentReportEditRes struct {
commonApi.EmptyRes
}
// DocumentReportGetReq 获取一条数据请求
type DocumentReportGetReq struct {
g.Meta `path:"/get" tags:"科研及专题报告" method:"get" summary:"获取科研及专题报告信息"`
commonApi.Author
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
}
// DocumentReportGetRes 获取一条数据结果
type DocumentReportGetRes struct {
g.Meta `mime:"application/json"`
*model.DocumentReportInfoRes
}
// DocumentReportDeleteReq 删除数据请求
type DocumentReportDeleteReq struct {
g.Meta `path:"/delete" tags:"科研及专题报告" method:"delete" summary:"删除科研及专题报告"`
commonApi.Author
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
}
// DocumentReportDeleteRes 删除数据返回
type DocumentReportDeleteRes struct {
commonApi.EmptyRes
}
// ReportNewFolderDataReq 新建文件夹
type ReportNewFolderDataReq struct {
g.Meta `path:"/reportNewFolderData" 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#需要填写文件夹名称"`
}
// ReportNewFolderDataRes 新建文件夹
type ReportNewFolderDataRes struct {
commonApi.EmptyRes
}
// ReportDataUniFileDownloadReq 单文件下载
type ReportDataUniFileDownloadReq struct {
g.Meta `path:"/reportDataUniFileDownload" tags:"科研及专题报告" method:"get" summary:"单文件下载"`
RelativePath string `p:"relativePath" dc:"相对路径" v:"required#相对路径不能为空"`
Type string `p:"type" dc:"1文件下载 2文件夹下载" v:"required#相对路径不能为空"`
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
}
// ReportDataUniFileDownloadRes 单文件下载
type ReportDataUniFileDownloadRes struct {
commonApi.EmptyRes
Path string `p:"path" dc:"文件夹压缩包下载路径"`
}
// ReportTreeStructureReq 树形结构
type ReportTreeStructureReq struct {
g.Meta `path:"/reportTreeStructure" 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
}
// ReportTreeStructureRes 树形结构
type ReportTreeStructureRes struct {
g.Meta `mime:"application/json"`
List []*model.DocumentReportListRes `json:"list"`
}
// ReportSelectByPidReq 获取pid
type ReportSelectByPidReq struct {
g.Meta `path:"/reportSelectByPid" tags:"科研及专题报告" method:"get" summary:"获取pid"`
ProjectId string `p:"projectId" v:"projectId@integer#项目id需为整数"`
PathName string `p:"pathName" dc:"路径地址(例子:/xxxx/xxxx" v:"required#路径地址不能为空"`
commonApi.Author
}
// ReportSelectByPidRes 获取pid
type ReportSelectByPidRes struct {
g.Meta `mime:"application/json"`
Pid string `p:"pid" dc:"pid"`
}
// ReportDataRecyclingStationReq 回收站
type ReportDataRecyclingStationReq struct {
g.Meta `path:"/reportDataRecyclingStation" 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恢复" `
}
// ReportDataRecyclingStationRes 回收站
type ReportDataRecyclingStationRes struct {
commonApi.EmptyRes
}
// ReportRecycleBinListReq 不分页请求参数
type ReportRecycleBinListReq struct {
g.Meta `path:"/reportRecycleBinList" 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
}
// ReportRecycleBinListRes 不分页请求参数
type ReportRecycleBinListRes struct {
g.Meta `mime:"application/json"`
List []*model.DocumentReportInfoRes `json:"list"`
}