Files
zmkgC/api/v1/system/bus_safety.go
2025-07-07 20:11:59 +08:00

127 lines
5.6 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2023-08-02 15:40:48
// 生成路径: api/v1/system/bus_safety.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"
comModel "github.com/tiger1103/gfast/v3/internal/app/common/model"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
// BusSafetySearchReq 分页请求参数
type BusSafetySearchReq struct {
g.Meta `path:"/list" tags:"安全例会管理" method:"get" summary:"安全例会管理列表"`
SafetyName string `p:"safetyName"` //安全检查名称
SafetyExplain string `p:"safetyExplain"` //安全说明
SafetyDocument string `p:"safetyDocument"` //安全检查文件
SafetyType string `p:"safetyType"` //安全类型
ProjectId string `p:"projectId" v:"projectId@integer#项目id需为整数"` //项目id
Status string `p:"status"` //帐号状态
CreateBy string `p:"createBy"` //创建者
UpdateAt string `p:"updateAt"` //更新者
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
commonApi.PageReq
commonApi.Author
}
// BusSafetySearchRes 列表返回结果
type BusSafetySearchRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.BusSafetyListRes `json:"list"`
}
// BusSafetyAddReq 添加操作请求参数
type BusSafetyAddReq struct {
g.Meta `path:"/add" tags:"安全例会管理" method:"post" summary:"安全例会管理添加"`
commonApi.Author
WxOrPc string `p:"wxOrPc" dc:"参数为1表示pc添加 否则为小程序添加" v:"required#wxOrPc不能为空"`
Openid string `p:"openid" v:"required-unless:WxOrPc,1#需要填写小程序的openid"`
SafetyName string `p:"safetyName" v:"required#安全检查名称不能为空"`
SafetyExplain string `p:"safetyExplain" `
SafetyDocument []*comModel.UpFile `p:"safetyDocument" `
SafetyType string `p:"safetyType" v:"required#安全类型不能为空"`
ProjectId int64 `p:"projectId" v:"required#项目id不能为空"`
SafetyGrade int64 `p:"safetyGrade" `
StartDate *gtime.Time `p:"startDate" `
}
// BusSafetyAddRes 添加操作返回结果
type BusSafetyAddRes struct {
commonApi.EmptyRes
}
// BusSafetyEditReq 修改操作请求参数
type BusSafetyEditReq struct {
g.Meta `path:"/edit" tags:"安全例会管理" method:"put" summary:"安全例会管理修改"`
commonApi.Author
WxOrPc string `p:"wxOrPc" dc:"参数为1表示pc添加 否则为小程序添加" v:"required#wxOrPc不能为空"`
Openid string `p:"openid" v:"required-unless:WxOrPc,1#需要填写小程序的openid"`
Id int64 `p:"id" v:"required#主键ID不能为空"`
SafetyName string `p:"safetyName" v:"required#安全检查名称不能为空"`
SafetyExplain string `p:"safetyExplain" `
SafetyDocument []*comModel.UpFile `p:"safetyDocument" `
SafetyType string `p:"safetyType" v:"required#安全类型不能为空"`
//ProjectId int64 `p:"projectId" `
Status string `p:"status" v:"required#帐号状态不能为空"`
SafetyGrade int64 `p:"safetyGrade" `
}
// BusSafetyEditRes 修改操作返回结果
type BusSafetyEditRes struct {
commonApi.EmptyRes
}
// BusSafetyGetReq 获取一条数据请求
type BusSafetyGetReq struct {
g.Meta `path:"/get" tags:"安全例会管理" method:"get" summary:"获取安全例会管理信息"`
commonApi.Author
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
}
// BusSafetyGetRes 获取一条数据结果
type BusSafetyGetRes struct {
g.Meta `mime:"application/json"`
*model.BusSafetyInfoRes
}
// BusSafetyDeleteReq 删除数据请求
type BusSafetyDeleteReq struct {
g.Meta `path:"/delete" tags:"安全例会管理" method:"delete" summary:"删除安全例会管理"`
commonApi.Author
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
}
// BusSafetyDeleteRes 删除数据返回
type BusSafetyDeleteRes struct {
commonApi.EmptyRes
}
// WxBusSafetyAddReq 添加操作请求参数
type WxBusSafetyAddReq struct {
g.Meta `path:"/wxAdd" tags:"安全例会管理" method:"post" summary:"微信小程序-安全例会管理添加"`
commonApi.Author
SafetyName string `p:"safetyName" v:"required#安全检查名称不能为空"`
Openid string `p:"openid" v:"required#小程序openid不能为空"`
SafetyExplain string `p:"safetyExplain" `
SafetyDocument []*comModel.UpFile `p:"safetyDocument" `
SafetyType string `p:"safetyType" v:"required#安全类型不能为空"`
ProjectId int64 `p:"projectId" `
SafetyGrade string `p:"safetyGrade" `
StartDate *gtime.Time `p:"startDate" `
}
// WxBusSafetyAddRes 添加操作返回结果
type WxBusSafetyAddRes struct {
commonApi.EmptyRes
}