144 lines
7.2 KiB
Go
144 lines
7.2 KiB
Go
// ==========================================================================
|
||
// GFast自动生成api操作代码。
|
||
// 生成日期:2023-12-12 15:21:22
|
||
// 生成路径: api/v1/system/manage_task.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"
|
||
)
|
||
|
||
// ManageTaskSearchReq 分页请求参数
|
||
type ManageTaskSearchReq struct {
|
||
g.Meta `path:"/list" tags:"航线任务下发" method:"get" summary:"航线任务下发列表"`
|
||
Id string `p:"id"` //主键ID
|
||
TaskName string `p:"taskName"` //任务名称 //任务开始执行时间毫秒时间戳 //0普通航线
|
||
MqClientId string `p:"mqClientId" dc:"关联机场"` //关联机场
|
||
AirLine string `p:"airLine" v:"airLine@integer#关联航线需为整数"` //关联航线
|
||
ProjectId string `p:"projectId" v:"projectId@integer#关联项目需为整数"` //关联项目
|
||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||
commonApi.PageReq
|
||
commonApi.Author
|
||
}
|
||
|
||
// ManageTaskSearchRes 列表返回结果
|
||
type ManageTaskSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.ManageTaskListRes `json:"list"`
|
||
}
|
||
type T struct {
|
||
Field1 string `json:"0"`
|
||
Field2 string `json:"1"`
|
||
Field3 string `json:"2"`
|
||
}
|
||
|
||
// ManageTaskAddReq 添加操作请求参数
|
||
type ManageTaskAddReq struct {
|
||
g.Meta `path:"/add" tags:"航线任务下发" method:"post" summary:"航线任务下发添加"`
|
||
commonApi.Author
|
||
TaskName string `p:"taskName" v:"required#任务名称不能为空"`
|
||
//TaskType string `p:"taskType" dc:"0立即任务 1定时任务 2条件任务" v:"between:0,2#设置值的范围为0~2"`
|
||
//ExecuteTime int64 `p:"executeTime" dc:"任务开始执行时间毫秒时间戳。可选字段。当 task_type 为 0 或 1 时必填,为 2 时非必填。" v:"required-unless:taskType,2#taskType不为2时必须不为空" `
|
||
WaylineType int `p:"waylineType" dc:"0普通航点航线" v:"in:0#设置值为0"`
|
||
Airport int64 `p:"airport" dc:"机场ID" v:"required#机场ID不能为空"`
|
||
AirLine int64 `p:"airLine" dc:"航线ID" v:"required#航线ID不能为空"`
|
||
ProjectId int64 `p:"projectId" dc:"项目ID" v:"required#项目ID不能为空"`
|
||
MqClientId string `p:"mqClientId" dc:"关联机场" v:"required#mq客户端id必须"`
|
||
RthAltitude int `p:"rthAltitude" dc:"返航高度 单位米" v:"between:20,1500#取值范围为20~1500"`
|
||
RthMode int `p:"rthMode" dc:"0智能高度 1设定高度(默认为0)" `
|
||
OutOfControlAction int `p:"outOfControlAction" dc:"0返航 1悬停 2降落(默认为0)"`
|
||
ExitWaylineWhenRcLost int `p:"exitWaylineWhenRcLost" dc:"0继续执行航线任务 1退出航线任务,执行遥控器失控动作(默认为0)"`
|
||
Remark string `p:"remark" `
|
||
}
|
||
|
||
// ManageTaskAddRes 添加操作返回结果
|
||
type ManageTaskAddRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// ManageTaskEditReq 修改操作请求参数
|
||
type ManageTaskEditReq struct {
|
||
g.Meta `path:"/edit" tags:"航线任务下发" method:"put" summary:"航线任务下发修改"`
|
||
commonApi.Author
|
||
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
||
TaskName string `p:"taskName" v:"required#任务名称不能为空"`
|
||
TaskType string `p:"taskType" dc:"0立即任务 1定时任务 2条件任务" v:"between:0,2#设置值的范围为0~2"`
|
||
ExecuteTime int64 `p:"executeTime" dc:"任务开始执行时间毫秒时间戳。可选字段。当 task_type 为 0 或 1 时必填,为 2 时非必填。" v:"required-unless:taskType,2#taskType不为2时必须不为空" `
|
||
WaylineType int `p:"waylineType" dc:"0普通航点航线" v:"in:0#设置值为0"`
|
||
Airport int64 `p:"airport" dc:"机场ID" v:"required#机场ID不能为空"`
|
||
AirLine int64 `p:"airLine" dc:"航线ID" v:"required#航线ID不能为空"`
|
||
ProjectId int64 `p:"projectId" dc:"项目ID" v:"required#项目ID不能为空"`
|
||
RthAltitude int `p:"rthAltitude" dc:"返航高度 单位米" v:"between:20,1500#取值范围为20~1500"`
|
||
RthMode int `p:"rthMode" dc:"0智能高度 1设定高度(默认为0)" `
|
||
OutOfControlAction int `p:"outOfControlAction" dc:"0返航 1悬停 2降落(默认为0)"`
|
||
ExitWaylineWhenRcLost int `p:"exitWaylineWhenRcLost" dc:"0继续执行航线任务 1退出航线任务,执行遥控器失控动作(默认为0)"`
|
||
Remark string `p:"remark" `
|
||
}
|
||
|
||
// ManageTaskEditRes 修改操作返回结果
|
||
type ManageTaskEditRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// ManageTaskGetReq 获取一条数据请求
|
||
type ManageTaskGetReq struct {
|
||
g.Meta `path:"/get" tags:"航线任务下发" method:"get" summary:"获取航线任务下发信息"`
|
||
commonApi.Author
|
||
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||
}
|
||
|
||
// ManageTaskGetRes 获取一条数据结果
|
||
type ManageTaskGetRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.ManageTaskInfoRes
|
||
}
|
||
|
||
// ManageTaskDeleteReq 删除数据请求
|
||
type ManageTaskDeleteReq struct {
|
||
g.Meta `path:"/delete" tags:"航线任务下发" method:"delete" summary:"删除航线任务下发"`
|
||
commonApi.Author
|
||
Ids int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||
}
|
||
|
||
// ManageTaskDeleteRes 删除数据返回
|
||
type ManageTaskDeleteRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// FlighttaskPrepareReq 航线任务下发
|
||
type FlighttaskPrepareReq struct {
|
||
g.Meta `path:"/FlighttaskPrepare" tags:"航线任务下发" method:"post" summary:"航线任务下发"`
|
||
commonApi.Author
|
||
Id string `p:"id" dc:"主键ID" v:"required#id不能为空"`
|
||
GatewaySn string `p:"gatewaySn" dc:"网关SN" v:"required#网关SN必须"`
|
||
TaskType string `p:"taskType" dc:"0立即任务 1定时任务 2条件任务" v:"between:0,2#设置值的范围为0~2"`
|
||
ExecuteTime int64 `p:"executeTime" dc:"任务开始执行时间毫秒时间戳。可选字段。当 task_type 为 0 或 1 时必填,为 2 时非必填。" v:"required-unless:taskType,2#taskType不为2时必须不为空" `
|
||
Remark string `p:"remark"`
|
||
|
||
TimedFlight string `p:"timedFlight" dc:"有值代表自动飞行(比如:'ok'),后端传值"`
|
||
//Airport s `p:"airport" `
|
||
BreakPoint *BreakPointReq `json:"breakPoint" dc:"断点信息"`
|
||
BreakpointRenewalUUID string `json:"breakpointRenewalUUID" dc:"断点续飞ID(计划UUID)"`
|
||
}
|
||
|
||
type BreakPointReq struct {
|
||
Index int `json:"index" dc:"断点状态"`
|
||
State int `json:"state" dc:"返航高度模式"`
|
||
Progress float32 `json:"progress" dc:"遥控器失控动作"`
|
||
WaylineId int `json:"wayline_id" dc:"航线失控动作"`
|
||
}
|
||
|
||
// FlighttaskPrepareRes 航线任务下发
|
||
type FlighttaskPrepareRes struct {
|
||
commonApi.EmptyRes
|
||
Id string `p:"id" `
|
||
}
|