初始
This commit is contained in:
170
api/v1/system/construction_details.go
Normal file
170
api/v1/system/construction_details.go
Normal file
@ -0,0 +1,170 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2024-03-13 18:10:56
|
||||
// 生成路径: api/v1/system/construction_details.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"
|
||||
)
|
||||
|
||||
// ConstructionDetailsSearchReq 分页请求参数
|
||||
type ConstructionDetailsSearchReq struct {
|
||||
g.Meta `path:"/list" tags:"施工类别详情" method:"get" summary:"施工类别详情列表"`
|
||||
Id string `p:"id"` //
|
||||
CreatedBy string `p:"createdBy" v:"createdBy@integer#需为整数"` //
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
|
||||
Name string `p:"name"` // 施工名称
|
||||
Types string `p:"types"` // 施工类别
|
||||
Total string `p:"total" v:"total@integer#总量需为整数"` // 总量
|
||||
ConstructionId string `p:"constructionId" v:"constructionId@integer#施工id(父级id)需为整数"` // 施工id(父级id)
|
||||
IsPercentage string `p:"isPercentage" v:"isPercentage@integer#数据类型是否为百分比需为整数"` // 数据类型是否为百分比
|
||||
StartTime string `p:"startTime" v:"startTime@datetime#开始时间需为YYYY-MM-DD hh:mm:ss格式"` // 开始时间
|
||||
EndTime string `p:"endTime" v:"endTime@datetime#结束时间需为YYYY-MM-DD hh:mm:ss格式"` // 结束时间
|
||||
Completed string `p:"completed" v:"completed@integer#完成量需为整数"` // 完成量
|
||||
Selectable string `p:"selectable" v:"selectable@integer#可选择余量需为整数"` // 可选择余量
|
||||
Overall string `p:"overall" v:"overall@integer#总余量需为整数"` // 总余量
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// ConstructionDetailsSearchRes 列表返回结果
|
||||
type ConstructionDetailsSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.ConstructionDetailsListRes `json:"list"`
|
||||
}
|
||||
|
||||
// ConstructionDetailsAddReq 添加操作请求参数
|
||||
type ConstructionDetailsAddReq struct {
|
||||
g.Meta `path:"/add" tags:"施工类别详情" method:"post" summary:"施工类别详情添加"`
|
||||
commonApi.Author
|
||||
Name string `p:"name" v:"required#施工名称不能为空"`
|
||||
Types string `p:"types" `
|
||||
Total int `p:"total" `
|
||||
ConstructionId int `p:"constructionId" `
|
||||
Remark string `p:"remark" `
|
||||
IsPercentage int `p:"isPercentage" `
|
||||
StartTime *gtime.Time `p:"startTime" `
|
||||
EndTime *gtime.Time `p:"endTime" `
|
||||
Completed int `p:"completed" `
|
||||
Selectable int `p:"selectable" `
|
||||
Overall int `p:"overall" `
|
||||
CreatedBy uint64
|
||||
}
|
||||
|
||||
// ConstructionDetailsAddRes 添加操作返回结果
|
||||
type ConstructionDetailsAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// ConstructionDetailsEditReq 修改操作请求参数
|
||||
type ConstructionDetailsEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"施工类别详情" method:"put" summary:"施工类别详情修改"`
|
||||
commonApi.Author
|
||||
Id uint64 `p:"id" v:"required#主键ID不能为空"`
|
||||
Name string `p:"name" v:"required#施工名称不能为空"`
|
||||
Types string `p:"types" `
|
||||
Total int `p:"total" `
|
||||
ConstructionId int `p:"constructionId" `
|
||||
Remark string `p:"remark" `
|
||||
IsPercentage int `p:"isPercentage" `
|
||||
StartTime *gtime.Time `p:"startTime" `
|
||||
EndTime *gtime.Time `p:"endTime" `
|
||||
Completed int `p:"completed" `
|
||||
Selectable int `p:"selectable" `
|
||||
Overall int `p:"overall" `
|
||||
UpdatedBy uint64
|
||||
}
|
||||
|
||||
// ConstructionDetailsEditRes 修改操作返回结果
|
||||
type ConstructionDetailsEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// ConstructionDetailsGetReq 获取一条数据请求
|
||||
type ConstructionDetailsGetReq struct {
|
||||
g.Meta `path:"/get" tags:"施工类别详情" method:"get" summary:"获取施工类别详情信息"`
|
||||
commonApi.Author
|
||||
Id uint64 `p:"id" v:"required#主键必须"` // 通过主键获取
|
||||
}
|
||||
|
||||
// ConstructionDetailsGetRes 获取一条数据结果
|
||||
type ConstructionDetailsGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.ConstructionDetailsInfoRes
|
||||
}
|
||||
|
||||
// ConstructionDetailsDeleteReq 删除数据请求
|
||||
type ConstructionDetailsDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"施工类别详情" method:"delete" summary:"删除施工类别详情"`
|
||||
commonApi.Author
|
||||
Ids []uint64 `p:"ids" v:"required#主键必须"` // 通过主键删除
|
||||
}
|
||||
|
||||
// ConstructionDetailsDeleteRes 删除数据返回
|
||||
type ConstructionDetailsDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// 查询指定方阵下、指定施工类别下的可选择余量
|
||||
type ConstructionDetailsListReq struct {
|
||||
g.Meta `path:"/list" tags:"施工类别详情" method:"get" summary:"施工类别详情列表"`
|
||||
commonApi.Author
|
||||
// 方阵id
|
||||
ConstructionId int `p:"constructionId"`
|
||||
// 设施名称
|
||||
ConstructionName string `p:"constructionName"`
|
||||
// 施工名称
|
||||
ConstructionDetailsName string `p:"constructionDetailsName"`
|
||||
}
|
||||
|
||||
// ConstructionDetailsListRes 列表返回结果
|
||||
type ConstructionDetailsListRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.ConstructionDetailsListRes `json:"list"`
|
||||
}
|
||||
|
||||
// 返回指定方阵下的 gannt json
|
||||
type GanntJsonReq struct {
|
||||
g.Meta `path:"/gannt" tags:"施工类别详情" method:"get" summary:"施工类别详情列表"`
|
||||
commonApi.Author
|
||||
// 方阵id
|
||||
FangzhenID int `p:"FangzhenID"`
|
||||
}
|
||||
|
||||
type GanntJsonRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
List []Gantt
|
||||
}
|
||||
|
||||
type Gantt struct {
|
||||
Id int64 `json:"id"`
|
||||
// 开始时间
|
||||
StartDate string `json:"start_date"`
|
||||
// 结束时间
|
||||
EndDate string `json:"end_date,omitempty"`
|
||||
// 持续时间
|
||||
Duration int `json:"duration"`
|
||||
// 任务名称
|
||||
Text string `json:"text"`
|
||||
// 子项目标识
|
||||
ConstructionId int `json:"construction_id,omitempty"`
|
||||
// 进度
|
||||
Progress float64 `json:"progress,omitempty"`
|
||||
// 父任务
|
||||
Parent int64 `json:"parent"`
|
||||
// 计划中颜色标识
|
||||
// PlanColor bo `json:"plan_color,omitempty"`
|
||||
// 是否展开
|
||||
Open bool `json:"open"`
|
||||
}
|
Reference in New Issue
Block a user