122 lines
5.5 KiB
Go
122 lines
5.5 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2023-12-11 16:10:18
|
|||
|
// 生成路径: api/v1/system/manage_airline.go
|
|||
|
// 生成人:gfast
|
|||
|
// desc:航线相关参数
|
|||
|
// company:云南奇讯科技有限公司
|
|||
|
// ==========================================================================
|
|||
|
|
|||
|
package system
|
|||
|
|
|||
|
import (
|
|||
|
"github.com/gogf/gf/v2/frame/g"
|
|||
|
"github.com/gogf/gf/v2/net/ghttp"
|
|||
|
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
|||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|||
|
)
|
|||
|
|
|||
|
// ManageAirlineSearchReq 分页请求参数
|
|||
|
type ManageAirlineSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"航线" method:"get" summary:"航线列表"`
|
|||
|
ProjectId string `p:"projectId" dc:"項目id" v:"projectId@integer#项目id需为整数"` //项目id
|
|||
|
MqClientId string `p:"mqClientId" dc:"关联机场"` //关联机场
|
|||
|
AirLine string `p:"airLine"` //航线名称
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineSearchRes 列表返回结果
|
|||
|
type ManageAirlineSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.ManageAirlineListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineAddReq 添加操作请求参数
|
|||
|
type ManageAirlineAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"航线" method:"post" summary:"航线添加"`
|
|||
|
commonApi.Author
|
|||
|
ProjectId int64 `p:"projectId" dc:"项目id" v:"required#项目id必须"`
|
|||
|
AirLine string `p:"airLine" dc:"航线名称" v:"required#航线名称必须"`
|
|||
|
StrId string `p:"strId" dc:"航线ID" v:"required#航线ID必须"`
|
|||
|
Speed int `p:"speed" dc:"航线速度" v:"required#航线速度必须"`
|
|||
|
Height int `p:"height" dc:"航线高度" v:"required#航线高度必须"`
|
|||
|
Gap int `p:"gap" dc:"航线间距" v:"required#航线间距必须"`
|
|||
|
MqClientId string `p:"mqClientId" dc:"关联机场" v:"required#mq客户端id必须"`
|
|||
|
Remark string `p:"remark" dc:"备注"`
|
|||
|
TakeOffSecurityHeight float64 `p:"takeOffSecurityHeight" dc:"安全起飞高度" `
|
|||
|
GlobalTransitionalSpeed float64 `p:"globalTransitionalSpeed" dc:"飞向首航点速度"`
|
|||
|
Air *model.AirlineEntity `p:"air" dc:"航线生成信息"`
|
|||
|
Positions []model.PositionsEntity `p:"positions" dc:"航线生成信息"`
|
|||
|
LngAndLatAndHeight string `p:"lngAndLatAndHeight" dc:"经度维度高度" v:"required#经度维度高度必须"`
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineAddRes 添加操作返回结果
|
|||
|
type ManageAirlineAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineEditReq 修改操作请求参数
|
|||
|
type ManageAirlineEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"航线" method:"put" summary:"航线修改"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
|||
|
AirLine string `p:"airLine" dc:"航线名称" v:"required#航线名称必须"`
|
|||
|
Speed int `p:"speed" dc:"航线速度" `
|
|||
|
Height int `p:"height" dc:"航线高度" `
|
|||
|
Gap int `p:"gap" dc:"航线间距" `
|
|||
|
Remark string `p:"remark" dc:"备注"`
|
|||
|
Air *model.AirlineEntity `p:"air" dc:"航线生成信息"`
|
|||
|
TakeOffSecurityHeight float64 `p:"takeOffSecurityHeight" dc:"安全起飞高度" `
|
|||
|
GlobalTransitionalSpeed float64 `p:"globalTransitionalSpeed" dc:"飞向首航点速度"`
|
|||
|
Positions []model.PositionsEntity `p:"positions" dc:"航线生成信息"`
|
|||
|
LngAndLatAndHeight string `p:"lngAndLatAndHeight" dc:"经度维度高度" v:"required#经度维度高度必须"`
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineEditRes 修改操作返回结果
|
|||
|
type ManageAirlineEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineGetReq 获取一条数据请求
|
|||
|
type ManageAirlineGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"航线" method:"get" summary:"获取航线信息"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineGetRes 获取一条数据结果
|
|||
|
type ManageAirlineGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.ManageAirlineInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineDeleteReq 删除数据请求
|
|||
|
type ManageAirlineDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"航线" method:"delete" summary:"删除航线"`
|
|||
|
commonApi.Author
|
|||
|
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// ManageAirlineDeleteRes 删除数据返回
|
|||
|
type ManageAirlineDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// RouteUploadReq 航线上传
|
|||
|
type RouteUploadReq struct {
|
|||
|
g.Meta `path:"/routeUpload" tags:"航线" method:"post" summary:"航线上传"`
|
|||
|
commonApi.Author
|
|||
|
ProjectId int64 `p:"projectId" dc:"航线文件"`
|
|||
|
MqClientId string `p:"mqClientId" dc:"无人机sn(mq客户端id))"`
|
|||
|
File *ghttp.UploadFile `p:"file" dc:"航线文件"`
|
|||
|
Remark string `p:"remark" dc:"备注"`
|
|||
|
}
|
|||
|
|
|||
|
// RouteUploadRes 航线上传
|
|||
|
type RouteUploadRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|