159 lines
6.1 KiB
Go
159 lines
6.1 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2023-08-02 17:11:39
|
|||
|
// 生成路径: api/v1/system/bus_quality.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"
|
|||
|
)
|
|||
|
|
|||
|
// BusQualitySearchReq 分页请求参数
|
|||
|
type BusQualitySearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"质量文档管理" method:"get" summary:"质量文档管理列表"`
|
|||
|
QualityName string `p:"qualityName"` //质量检查名称
|
|||
|
QualityType string `p:"qualityType"` //质量类型
|
|||
|
Status string `p:"status"` //帐号状态
|
|||
|
ProjectId string `p:"projectId"` //项目id
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// BusQualitySearchRes 列表返回结果
|
|||
|
type BusQualitySearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.BusQualityListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityAddReq 添加操作请求参数
|
|||
|
type BusQualityAddReq 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"`
|
|||
|
QualityName string `p:"qualityName" v:"required#质量检查名称不能为空"`
|
|||
|
QualityExplain string `p:"qualityExplain" `
|
|||
|
QualityDocument []*comModel.UpFile `p:"qualityDocument" `
|
|||
|
QualityType string `p:"qualityType" `
|
|||
|
ProjectId int64 `p:"projectId" `
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityAddRes 添加操作返回结果
|
|||
|
type BusQualityAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityEditReq 修改操作请求参数
|
|||
|
type BusQualityEditReq 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 uint64 `p:"id" v:"required#主键ID不能为空"`
|
|||
|
QualityName string `p:"qualityName" v:"required#质量检查名称不能为空"`
|
|||
|
QualityExplain string `p:"qualityExplain" `
|
|||
|
QualityDocument []*comModel.UpFile `p:"qualityDocument" `
|
|||
|
QualityType string `p:"qualityType" `
|
|||
|
ProjectId int64 `p:"projectId" `
|
|||
|
Status string `p:"status" v:"required#帐号状态不能为空"`
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityEditRes 修改操作返回结果
|
|||
|
type BusQualityEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityGetReq 获取一条数据请求
|
|||
|
type BusQualityGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"质量文档管理" method:"get" summary:"获取质量文档管理信息"`
|
|||
|
commonApi.Author
|
|||
|
Id uint64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityGetRes 获取一条数据结果
|
|||
|
type BusQualityGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.BusQualityInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityDeleteReq 删除数据请求
|
|||
|
type BusQualityDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"质量文档管理" method:"delete" summary:"删除质量文档管理"`
|
|||
|
commonApi.Author
|
|||
|
Ids []uint64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// BusQualityDeleteRes 删除数据返回
|
|||
|
type BusQualityDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// GraphReq 图标统计
|
|||
|
type GraphReq struct {
|
|||
|
g.Meta `path:"/graph" tags:"质量文档管理" method:"get" summary:"安全情况-图标统计"`
|
|||
|
ProjectId string `json:"projectId" v:"required#项目ID必须"`
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// GraphRes 图标统计
|
|||
|
type GraphRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
GraphList []*GraphListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
type GraphListRes struct {
|
|||
|
GraphStatus string `p:"graphStatus" dc:"类型 0表示站班会"`
|
|||
|
GraphName string `p:"graphName" dc:"名称"`
|
|||
|
GraphNumber int `p:"graphNumber" dc:"数量"`
|
|||
|
}
|
|||
|
|
|||
|
// GraphDataListReq 图标统计列表
|
|||
|
type GraphDataListReq struct {
|
|||
|
g.Meta `path:"/graphDataList" tags:"质量文档管理" method:"get" summary:"安全情况-图标统计列表"`
|
|||
|
GraphStatus string `json:"graphStatus" v:"required#类型必须"`
|
|||
|
ProjectId string `json:"projectId" v:"required#项目ID必须"`
|
|||
|
commonApi.Author
|
|||
|
commonApi.PageReq
|
|||
|
}
|
|||
|
|
|||
|
// GraphDataListRes 图标统计列表
|
|||
|
type GraphDataListRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
GraphDataList []*GraphDataListTwoRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
type GraphDataListTwoRes struct {
|
|||
|
Id int64 `p:"id" dc:"主键ID"`
|
|||
|
Name string `p:"name" dc:"名称"`
|
|||
|
DateTime *gtime.Time `p:"dateTime" dc:"时间"`
|
|||
|
Type string `p:"type" dc:"类型 0站班会 1案例"`
|
|||
|
}
|
|||
|
|
|||
|
// WxBusQualityAddReq 添加操作请求参数
|
|||
|
type WxBusQualityAddReq struct {
|
|||
|
g.Meta `path:"/wxAdd" tags:"质量文档管理" method:"post" summary:"微信小程序-质量文档管理添加"`
|
|||
|
commonApi.Author
|
|||
|
QualityName string `p:"qualityName" v:"required#质量检查名称不能为空"`
|
|||
|
QualityExplain string `p:"qualityExplain" `
|
|||
|
QualityDocument []*comModel.UpFile `p:"qualityDocument" `
|
|||
|
QualityType string `p:"qualityType" `
|
|||
|
ProjectId int64 `p:"projectId" `
|
|||
|
}
|
|||
|
|
|||
|
// WxBusQualityAddRes 添加操作返回结果
|
|||
|
type WxBusQualityAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|