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.
48 lines
1.6 KiB
48 lines
1.6 KiB
package vo
|
|
|
|
import (
|
|
"laic-backend/common"
|
|
"laic-backend/model"
|
|
)
|
|
|
|
// TaskPageReq 任务分页查询
|
|
type TaskPageReq struct {
|
|
common.Pagination
|
|
Status string `json:"status" form:"status"`
|
|
ScheduleType string `json:"scheduleType" form:"scheduleType"`
|
|
Keyword string `json:"keyword" form:"keyword"` // 匹配 name
|
|
}
|
|
|
|
// TaskCreateReq 新增任务
|
|
type TaskCreateReq struct {
|
|
Name string `json:"name" validate:"required,max=128"`
|
|
DockID string `json:"dockId" validate:"required,max=64"`
|
|
RouteID int64 `json:"routeId"`
|
|
ScheduleType string `json:"scheduleType" validate:"omitempty,oneof=once cron"`
|
|
ScheduleCron string `json:"scheduleCron" validate:"max=32"`
|
|
VideoPolicy string `json:"videoPolicy" validate:"max=16"`
|
|
}
|
|
|
|
// TaskUpdateReq 编辑任务
|
|
type TaskUpdateReq struct {
|
|
Name string `json:"name" validate:"max=128"`
|
|
DockID string `json:"dockId" validate:"max=64"`
|
|
RouteID *int64 `json:"routeId"`
|
|
ScheduleType string `json:"scheduleType" validate:"omitempty,oneof=once cron"`
|
|
ScheduleCron *string `json:"scheduleCron" validate:"omitempty,max=32"`
|
|
VideoPolicy string `json:"videoPolicy" validate:"max=16"`
|
|
Status string `json:"status"` // draft / enabled / disabled
|
|
}
|
|
|
|
// TaskPlanVO 任务计划及其运行摘要
|
|
type TaskPlanVO struct {
|
|
model.TaskPlan
|
|
PlanStatus string `json:"planStatus"`
|
|
LatestExecution *model.TaskExecution `json:"latestExecution"`
|
|
}
|
|
|
|
// TaskExecuteVO 任务执行下发结果
|
|
type TaskExecuteVO struct {
|
|
Execution *model.TaskExecution `json:"execution"`
|
|
Command *model.DeviceCommandLog `json:"command"`
|
|
}
|
|
|