92 lines
3.4 KiB
Go
92 lines
3.4 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2023-11-20 11:18:36
|
|||
|
// 生成路径: api/v1/system/bus_violation_level.go
|
|||
|
// 生成人:gfast
|
|||
|
// desc:违章等级相关参数
|
|||
|
// company:云南奇讯科技有限公司
|
|||
|
// ==========================================================================
|
|||
|
|
|||
|
package system
|
|||
|
|
|||
|
import (
|
|||
|
"github.com/gogf/gf/v2/frame/g"
|
|||
|
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
|||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|||
|
)
|
|||
|
|
|||
|
// BusViolationLevelSearchReq 分页请求参数
|
|||
|
type BusViolationLevelSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"违章等级" method:"get" summary:"违章等级列表"`
|
|||
|
TourType string `p:"tourType"` //违章类型
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelSearchRes 列表返回结果
|
|||
|
type BusViolationLevelSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.BusViolationLevelListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelAddReq 添加操作请求参数
|
|||
|
type BusViolationLevelAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"违章等级" method:"post" summary:"违章等级添加"`
|
|||
|
commonApi.Author
|
|||
|
ProjectId string `p:"projectId" dc:"项目id" v:"required" `
|
|||
|
Grade string `p:"grade" dc:"26字母中的任意大写" v:"regex:^[A-Z]$#请输入A~Z的任意大写字母"`
|
|||
|
Color string `p:"color" dc:"颜色(格式:rgba(252, 5, 5, 1))"`
|
|||
|
TourType string `p:"tourType" dc:"类型,多个用逗号分隔"`
|
|||
|
Risx string `p:"risx" dc:"风险等级"`
|
|||
|
Posts []int64 `p:"posts" dc:"岗位主键ID"`
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelAddRes 添加操作返回结果
|
|||
|
type BusViolationLevelAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelEditReq 修改操作请求参数
|
|||
|
type BusViolationLevelEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"违章等级" method:"put" summary:"违章等级修改"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
|||
|
Grade string `p:"grade" dc:"26字母中的任意大写" v:"regex:^[A-Z]$"`
|
|||
|
Color string `p:"color" dc:"颜色(格式:rgba(252, 5, 5, 1))"`
|
|||
|
TourType string `p:"tourType" dc:"类型,多个用逗号分隔"`
|
|||
|
Risx string `p:"risx" dc:"风险等级"`
|
|||
|
Posts []int64 `p:"posts" dc:"岗位主键ID"`
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelEditRes 修改操作返回结果
|
|||
|
type BusViolationLevelEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelGetReq 获取一条数据请求
|
|||
|
type BusViolationLevelGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"违章等级" method:"get" summary:"获取违章等级信息"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelGetRes 获取一条数据结果
|
|||
|
type BusViolationLevelGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.BusViolationLevelInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelDeleteReq 删除数据请求
|
|||
|
type BusViolationLevelDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"违章等级" method:"delete" summary:"删除违章等级"`
|
|||
|
commonApi.Author
|
|||
|
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// BusViolationLevelDeleteRes 删除数据返回
|
|||
|
type BusViolationLevelDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|