105 lines
4.4 KiB
Go
105 lines
4.4 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2024-03-13 17:36:45
|
|||
|
// 生成路径: api/v1/system/construction_project.go
|
|||
|
// 生成人:gfast
|
|||
|
// desc:施工项目相关参数
|
|||
|
// company:云南奇讯科技有限公司
|
|||
|
// ==========================================================================
|
|||
|
|
|||
|
package system
|
|||
|
|
|||
|
import (
|
|||
|
"github.com/gogf/gf/v2/frame/g"
|
|||
|
"github.com/gogf/gf/v2/os/gtime"
|
|||
|
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
|||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|||
|
)
|
|||
|
|
|||
|
// ConstructionProjectSearchReq 分页请求参数
|
|||
|
type ConstructionProjectSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"施工项目" method:"get" summary:"施工项目列表"`
|
|||
|
ConstructionId string `p:"constructionId"` //主键id
|
|||
|
CreatedBy string `p:"createdBy" v:"createdBy@integer#需为整数"` //
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
|
|||
|
FangzhenId string `p:"fangzhenId" v:"fangzhenId@integer#方阵id需为整数"` //方阵id
|
|||
|
ConstructionName string `p:"constructionName"` //施工名称
|
|||
|
Total string `p:"total" v:"total@integer#总量需为整数"` //总量
|
|||
|
IsPercentage string `p:"isPercentage" v:"isPercentage@integer#数据类型是否为百分比需为整数"` //数据类型是否为百分比
|
|||
|
EndTime string `p:"endTime" v:"endTime@datetime#结束时间需为YYYY-MM-DD hh:mm:ss格式"` //结束时间
|
|||
|
StartTime string `p:"startTime" v:"startTime@datetime#开始时间需为YYYY-MM-DD hh:mm:ss格式"` //开始时间
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectSearchRes 列表返回结果
|
|||
|
type ConstructionProjectSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.ConstructionProjectListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectAddReq 添加操作请求参数
|
|||
|
type ConstructionProjectAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"施工项目" method:"post" summary:"施工项目添加"`
|
|||
|
commonApi.Author
|
|||
|
FangzhenId int `p:"fangzhenId" `
|
|||
|
ConstructionName string `p:"constructionName" v:"required#施工名称不能为空"`
|
|||
|
Total int `p:"total" `
|
|||
|
Remark string `p:"remark" `
|
|||
|
IsPercentage int `p:"isPercentage" `
|
|||
|
EndTime *gtime.Time `p:"endTime" `
|
|||
|
StartTime *gtime.Time `p:"startTime" `
|
|||
|
CreatedBy uint64
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectAddRes 添加操作返回结果
|
|||
|
type ConstructionProjectAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectEditReq 修改操作请求参数
|
|||
|
type ConstructionProjectEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"施工项目" method:"put" summary:"施工项目修改"`
|
|||
|
commonApi.Author
|
|||
|
ConstructionId uint64 `p:"constructionId" v:"required#主键ID不能为空"`
|
|||
|
FangzhenId int `p:"fangzhenId" `
|
|||
|
ConstructionName string `p:"constructionName" v:"required#施工名称不能为空"`
|
|||
|
Total int `p:"total" `
|
|||
|
Remark string `p:"remark" `
|
|||
|
IsPercentage int `p:"isPercentage" `
|
|||
|
EndTime *gtime.Time `p:"endTime" `
|
|||
|
StartTime *gtime.Time `p:"startTime" `
|
|||
|
UpdatedBy uint64
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectEditRes 修改操作返回结果
|
|||
|
type ConstructionProjectEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectGetReq 获取一条数据请求
|
|||
|
type ConstructionProjectGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"施工项目" method:"get" summary:"获取施工项目信息"`
|
|||
|
commonApi.Author
|
|||
|
ConstructionId uint64 `p:"constructionId" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectGetRes 获取一条数据结果
|
|||
|
type ConstructionProjectGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.ConstructionProjectInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectDeleteReq 删除数据请求
|
|||
|
type ConstructionProjectDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"施工项目" method:"delete" summary:"删除施工项目"`
|
|||
|
commonApi.Author
|
|||
|
ConstructionIds []uint64 `p:"constructionIds" v:"required#主键必须"` //通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// ConstructionProjectDeleteRes 删除数据返回
|
|||
|
type ConstructionProjectDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|