93 lines
3.3 KiB
Go
93 lines
3.3 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2023-08-04 16:24:38
|
|||
|
// 生成路径: api/v1/system/qianqi_road.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"
|
|||
|
)
|
|||
|
|
|||
|
// QianqiRoadSearchReq 分页请求参数
|
|||
|
type QianqiRoadSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"道路" method:"get" summary:"道路列表"`
|
|||
|
Id string `p:"id"` //序号
|
|||
|
ProjectId string `p:"projectId"` //项目id
|
|||
|
Name string `p:"name"` //名称
|
|||
|
SourceId string `p:"sourceId"` //资源id
|
|||
|
SourcePath string `p:"sourcePath"` //资源路径
|
|||
|
CreateBy string `p:"createBy"` //创建人
|
|||
|
UpdateBy string `p:"updateBy"` //更新人
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
|||
|
SourceType string `p:"sourceType"` //资源类型
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadSearchRes 列表返回结果
|
|||
|
type QianqiRoadSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.QianqiRoadListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadAddReq 添加操作请求参数
|
|||
|
type QianqiRoadAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"道路" method:"post" summary:"道路添加"`
|
|||
|
commonApi.Author
|
|||
|
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
|||
|
File []*ghttp.UploadFile `p:"file" `
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadAddRes 添加操作返回结果
|
|||
|
type QianqiRoadAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadEditReq 修改操作请求参数
|
|||
|
type QianqiRoadEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"道路" method:"put" summary:"道路修改"`
|
|||
|
commonApi.Author
|
|||
|
Id int `p:"id" v:"required#主键ID不能为空"`
|
|||
|
Name string `p:"name" v:"required#名称不能为空"`
|
|||
|
SourceType string `p:"sourceType" `
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadEditRes 修改操作返回结果
|
|||
|
type QianqiRoadEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadGetReq 获取一条数据请求
|
|||
|
type QianqiRoadGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"道路" method:"get" summary:"获取道路信息"`
|
|||
|
commonApi.Author
|
|||
|
Id int `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadGetRes 获取一条数据结果
|
|||
|
type QianqiRoadGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.QianqiRoadInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadDeleteReq 删除数据请求
|
|||
|
type QianqiRoadDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"道路" method:"delete" summary:"删除道路"`
|
|||
|
commonApi.Author
|
|||
|
Ids []int `p:"ids" v:"required#主键必须"` //通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// QianqiRoadDeleteRes 删除数据返回
|
|||
|
type QianqiRoadDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|