初始
This commit is contained in:
104
api/v1/system/qianqi_redline.go
Normal file
104
api/v1/system/qianqi_redline.go
Normal file
@ -0,0 +1,104 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2023-07-31 11:45:12
|
||||
// 生成路径: api/v1/system/qianqi_redline.go
|
||||
// 生成人:gfast
|
||||
// desc:红线相关参数
|
||||
// company:云南奇讯科技有限公司
|
||||
// ==========================================================================
|
||||
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
||||
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
||||
)
|
||||
|
||||
// QianqiRedlineSearchReq 分页请求参数
|
||||
type QianqiRedlineSearchReq struct {
|
||||
g.Meta `path:"/list" tags:"红线" method:"get" summary:"红线列表"`
|
||||
ProjectId string `p:"projectId" v:"required#项目id不能为空"` //项目id
|
||||
Name string `p:"name"` //名称
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||||
NotInPlan bool `p:"notInPlan"`
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// QianqiRedlineSearchRes 列表返回结果
|
||||
type QianqiRedlineSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.QianqiRedlineListRes `json:"list"`
|
||||
}
|
||||
|
||||
// QianqiRedlineAddReq 添加操作请求参数
|
||||
type QianqiRedlineAddReq struct {
|
||||
g.Meta `path:"/add" tags:"红线" method:"post" summary:"红线添加"`
|
||||
commonApi.Author
|
||||
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
||||
//Name string `p:"name" v:"required#名称不能为空"`
|
||||
//SourceId string `p:"sourceId" `
|
||||
//SourcePath string `p:"sourcePath" `
|
||||
File []*ghttp.UploadFile `p:"file" `
|
||||
}
|
||||
|
||||
// QianqiRedlineAddRes 添加操作返回结果
|
||||
type QianqiRedlineAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// QianqiRedlineEditReq 修改操作请求参数
|
||||
type QianqiRedlineEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"红线" method:"put" summary:"红线修改"`
|
||||
commonApi.Author
|
||||
Id int `p:"id" v:"required#主键ID不能为空"`
|
||||
//ProjectId string `p:"projectId" `
|
||||
Name string `p:"name" v:"required#名称不能为空"`
|
||||
//SourceId string `p:"sourceId" `
|
||||
//SourcePath string `p:"sourcePath" `
|
||||
}
|
||||
|
||||
// QianqiRedlineEditRes 修改操作返回结果
|
||||
type QianqiRedlineEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// QianqiRedlineGetReq 获取一条数据请求
|
||||
type QianqiRedlineGetReq struct {
|
||||
g.Meta `path:"/get" tags:"红线" method:"get" summary:"获取红线信息"`
|
||||
commonApi.Author
|
||||
Id int `p:"id" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// QianqiRedlineGetRes 获取一条数据结果
|
||||
type QianqiRedlineGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.QianqiRedlineInfoRes
|
||||
}
|
||||
|
||||
// QianqiRedlineDeleteReq 删除数据请求
|
||||
type QianqiRedlineDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"红线" method:"delete" summary:"删除红线"`
|
||||
commonApi.Author
|
||||
Ids []int `p:"ids" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// QianqiRedlineDeleteRes 删除数据返回
|
||||
type QianqiRedlineDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// UploadFileRedlineReq 读取shp文件内容
|
||||
type ReadFileRedlineReq struct {
|
||||
g.Meta `path:"/readRedlineFile" tags:"红线" method:"post" summary:"读取红线shp文件"`
|
||||
commonApi.Author
|
||||
Id int `p:"id" v:"required#主键ID不能为空"`
|
||||
}
|
||||
type ReadFileRedlineRes struct {
|
||||
commonApi.EmptyRes
|
||||
FileName string `p:"fileName" `
|
||||
FilePath string `p:"filePath" `
|
||||
}
|
Reference in New Issue
Block a user