初始
This commit is contained in:
103
api/v1/system/bus_company.go
Normal file
103
api/v1/system/bus_company.go
Normal file
@ -0,0 +1,103 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2023-07-28 14:08:14
|
||||
// 生成路径: api/v1/system/bus_company.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"
|
||||
)
|
||||
|
||||
// BusCompanySearchReq 分页请求参数
|
||||
type BusCompanySearchReq struct {
|
||||
g.Meta `path:"/list" tags:"公司" method:"get" summary:"公司列表"`
|
||||
CompanyId string `p:"companyId"` //序号
|
||||
CompanyName string `p:"companyName"` //公司名称
|
||||
Status string `p:"status"` //帐号状态
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// BusCompanySearchRes 列表返回结果
|
||||
type BusCompanySearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.BusCompanyListRes `json:"list"`
|
||||
}
|
||||
|
||||
// BusCompanyAddReq 添加操作请求参数
|
||||
type BusCompanyAddReq struct {
|
||||
g.Meta `path:"/add" tags:"公司" method:"post" summary:"公司添加"`
|
||||
commonApi.Author
|
||||
CompanyName string `p:"companyName" v:"required#公司名称不能为空"`
|
||||
Status string `p:"status" v:"required#帐号状态不能为空"`
|
||||
UpdateBy string `p:"updateBy" `
|
||||
}
|
||||
|
||||
// BusCompanyAddRes 添加操作返回结果
|
||||
type BusCompanyAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// BusCompanyEditReq 修改操作请求参数
|
||||
type BusCompanyEditReq struct {
|
||||
g.Meta `path:"/edit" tags:"公司" method:"put" summary:"公司修改"`
|
||||
commonApi.Author
|
||||
CompanyId int64 `p:"companyId" v:"required#主键ID不能为空"`
|
||||
CompanyName string `p:"companyName" v:"required#公司名称不能为空"`
|
||||
Status string `p:"status" v:"required#帐号状态不能为空"`
|
||||
UpdateBy string `p:"updateBy" `
|
||||
}
|
||||
|
||||
// BusCompanyEditRes 修改操作返回结果
|
||||
type BusCompanyEditRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// BusCompanyGetReq 获取一条数据请求
|
||||
type BusCompanyGetReq struct {
|
||||
g.Meta `path:"/get" tags:"公司" method:"get" summary:"获取公司信息"`
|
||||
commonApi.Author
|
||||
CompanyId int64 `p:"companyId" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// BusCompanyGetRes 获取一条数据结果
|
||||
type BusCompanyGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.BusCompanyInfoRes
|
||||
}
|
||||
|
||||
// BusCompanyDeleteReq 删除数据请求
|
||||
type BusCompanyDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"公司" method:"delete" summary:"删除公司"`
|
||||
commonApi.Author
|
||||
CompanyIds []int64 `p:"companyIds" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// BusCompanyDeleteRes 删除数据返回
|
||||
type BusCompanyDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
//app
|
||||
|
||||
// BusCompanyAppSearchReq分页请求参数
|
||||
type BusCompanyAppSearchReq struct {
|
||||
g.Meta `path:"/applist" tags:"材料设备App" method:"get" summary:"公司app列表"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// BusCompanyAppSearchRes 列表返回结果
|
||||
type BusCompanyAppSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.BusCompanyAppListRes `json:"list"`
|
||||
}
|
Reference in New Issue
Block a user