低空智控平台 后端go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
1.2 KiB

package vo
import (
"laic-backend/common"
"laic-backend/model"
)
// RoutePageReq 航线分页查询
type RoutePageReq struct {
common.Pagination
Keyword string `json:"keyword" form:"keyword"` // 匹配 name / description
}
// RouteWaypointReq 航点
type RouteWaypointReq struct {
Longitude float64 `json:"longitude"`
Latitude float64 `json:"latitude"`
Altitude float64 `json:"altitude"`
Speed float64 `json:"speed"`
Yaw float64 `json:"yaw"`
HoldSec int `json:"holdSec"`
}
// RouteCreateReq 新增航线
type RouteCreateReq struct {
Name string `json:"name" validate:"required,max=128"`
Description string `json:"description" validate:"max=256"`
Waypoints []RouteWaypointReq `json:"waypoints"`
}
// RouteUpdateReq 编辑航线
type RouteUpdateReq struct {
Name string `json:"name" validate:"max=128"`
Description string `json:"description" validate:"max=256"`
Waypoints *[]RouteWaypointReq `json:"waypoints"` // 提供则整体替换航点
}
// RouteVO 航线详情(含航点)
type RouteVO struct {
*model.Route
Waypoints []model.RouteWaypoint `json:"waypoints"`
}