初始
This commit is contained in:
120
api/v1/system/bus_machinery.go
Normal file
120
api/v1/system/bus_machinery.go
Normal file
@ -0,0 +1,120 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2023-07-29 14:02:01
|
||||
// 生成路径: api/v1/system/bus_machinery.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"
|
||||
)
|
||||
|
||||
// BusMachinerySearchReq 分页请求参数
|
||||
type BusMachinerySearchReq struct {
|
||||
g.Meta `path:"/list" tags:"机械" method:"get" summary:"机械列表"`
|
||||
MachineryName string `p:"machineryName"` //机械名称
|
||||
ProjectId string `p:"projectId"` //项目id
|
||||
Status string `p:"status"` //施工类型状态
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// BusMachinerySearchRes 列表返回结果
|
||||
type BusMachinerySearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.BusMachineryListRes `json:"list"`
|
||||
}
|
||||
|
||||
// BusMachineryAddReq 添加操作请求参数
|
||||
type BusMachineryAddReq struct {
|
||||
g.Meta `path:"/add" tags:"机械" method:"post" summary:"机械添加"`
|
||||
commonApi.Author
|
||||
MachineryName string `p:"machineryName" v:"required#机械名称不能为空"`
|
||||
MachineryNumber string `p:"machineryNumber" `
|
||||
ProjectId int64 `p:"projectId" `
|
||||
CheckoutNumber string `p:"checkoutNumber" `
|
||||
CheckoutUnit string `p:"checkoutUnit" `
|
||||
CheckoutDate string `p:"checkoutDate" `
|
||||
//Number int `p:"number"`
|
||||
EntryTime *gtime.Time `p:"entryTime" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"`
|
||||
//Principal string `p:"principal" dc:"图片url"`
|
||||
Remark string `p:"remark"`
|
||||
}
|
||||
|
||||
// BusMachineryAddRes 添加操作返回结果
|
||||
type BusMachineryAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// BusMachineryEditReq 修改操作请求参数
|
||||
type BusMachineryEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"机械" method:"put" summary:"机械修改"`
|
||||
commonApi.Author
|
||||
Id uint64 `p:"id" v:"required#主键ID不能为空"`
|
||||
MachineryName string `p:"machineryName" v:"required#机械名称不能为空"`
|
||||
MachineryNumber string `p:"machineryNumber" `
|
||||
CheckoutNumber string `p:"checkoutNumber" `
|
||||
CheckoutUnit string `p:"checkoutUnit" `
|
||||
CheckoutDate string `p:"checkoutDate" `
|
||||
Status string `p:"status" `
|
||||
//Number int `p:"number"`
|
||||
EntryTime *gtime.Time `p:"entryTime"`
|
||||
//Principal string `p:"principal"`
|
||||
Remark string `p:"remark"`
|
||||
}
|
||||
|
||||
// BusMachineryEditRes 修改操作返回结果
|
||||
type BusMachineryEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// BusMachineryGetReq 获取一条数据请求
|
||||
type BusMachineryGetReq struct {
|
||||
g.Meta `path:"/get" tags:"机械" method:"get" summary:"获取机械信息"`
|
||||
commonApi.Author
|
||||
Id uint64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// BusMachineryGetRes 获取一条数据结果
|
||||
type BusMachineryGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.BusMachineryInfoRes
|
||||
}
|
||||
|
||||
// BusMachineryDeleteReq 删除数据请求
|
||||
type BusMachineryDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"机械" method:"delete" summary:"删除机械"`
|
||||
commonApi.Author
|
||||
Ids []uint64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// BusMachineryDeleteRes 删除数据返回
|
||||
type BusMachineryDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// app BusMachineryAppSearchReq 分页请求参数
|
||||
type BusMachineryAppSearchReq struct {
|
||||
g.Meta `path:"/applist" tags:"机械" method:"get" summary:"App机械列表"`
|
||||
ThreeSreach string `p:"threeSearch" dc:"机械名称|编号|负责人"`
|
||||
ProjectId string `p:"projectId" dc:"项目id"` //项目id
|
||||
AppStatus int `p:"appStatus" dc:"0 全部 1入场 2停用 3出场 "` //施工类型状态
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// BusMachineryAppSearchRes 列表返回结果
|
||||
type BusMachineryAppSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.BusMachineryAppListRes `json:"list"`
|
||||
}
|
Reference in New Issue
Block a user