swag
This commit is contained in:
239
docs/docs.go
239
docs/docs.go
@@ -550,19 +550,106 @@ const docTemplate = `{
|
|||||||
"DeviceTypeDevice"
|
"DeviceTypeDevice"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"models.PlanContentType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"sub_plans",
|
||||||
|
"tasks"
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"PlanContentTypeSubPlans": "计划包含子计划",
|
||||||
|
"PlanContentTypeTasks": "计划包含任务"
|
||||||
|
},
|
||||||
|
"x-enum-descriptions": [
|
||||||
|
"计划包含子计划",
|
||||||
|
"计划包含任务"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"PlanContentTypeSubPlans",
|
||||||
|
"PlanContentTypeTasks"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"models.PlanExecutionType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"automatic",
|
||||||
|
"manual"
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"PlanExecutionTypeAutomatic": "自动执行 (包含定时和循环)",
|
||||||
|
"PlanExecutionTypeManual": "手动执行"
|
||||||
|
},
|
||||||
|
"x-enum-descriptions": [
|
||||||
|
"自动执行 (包含定时和循环)",
|
||||||
|
"手动执行"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"PlanExecutionTypeAutomatic",
|
||||||
|
"PlanExecutionTypeManual"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"models.TaskType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"waiting"
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"TaskTypeWaiting": "等待任务"
|
||||||
|
},
|
||||||
|
"x-enum-descriptions": [
|
||||||
|
"等待任务"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"TaskTypeWaiting"
|
||||||
|
]
|
||||||
|
},
|
||||||
"plan.CreatePlanRequest": {
|
"plan.CreatePlanRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
|
"content_type",
|
||||||
|
"execution_type",
|
||||||
"name"
|
"name"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"content_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanContentType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "tasks"
|
||||||
|
},
|
||||||
|
"cron_expression": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "0 0 6 * * *"
|
||||||
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "根据温度自动调节风扇和加热器"
|
"example": "根据温度自动调节风扇和加热器"
|
||||||
},
|
},
|
||||||
|
"execution_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanExecutionType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "automatic"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "猪舍温度控制计划"
|
"example": "猪舍温度控制计划"
|
||||||
|
},
|
||||||
|
"sub_plan_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.TaskRequest"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -584,10 +671,30 @@ const docTemplate = `{
|
|||||||
"plan.PlanResponse": {
|
"plan.PlanResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"content_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanContentType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "tasks"
|
||||||
|
},
|
||||||
|
"cron_expression": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "0 0 6 * * *"
|
||||||
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "根据温度自动调节风扇和加热器"
|
"example": "根据温度自动调节风扇和加热器"
|
||||||
},
|
},
|
||||||
|
"execution_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanExecutionType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "automatic"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"example": 1
|
"example": 1
|
||||||
@@ -595,19 +702,151 @@ const docTemplate = `{
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "猪舍温度控制计划"
|
"example": "猪舍温度控制计划"
|
||||||
|
},
|
||||||
|
"sub_plans": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.SubPlanResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.TaskResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plan.SubPlanResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"child_plan": {
|
||||||
|
"$ref": "#/definitions/plan.PlanResponse"
|
||||||
|
},
|
||||||
|
"child_plan_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 2
|
||||||
|
},
|
||||||
|
"execution_order": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"parent_plan_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plan.TaskRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开1号风扇"
|
||||||
|
},
|
||||||
|
"execution_order": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开风扇"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"$ref": "#/definitions/controller.Properties"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.TaskType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "waiting"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plan.TaskResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开1号风扇"
|
||||||
|
},
|
||||||
|
"execution_order": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开风扇"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"$ref": "#/definitions/controller.Properties"
|
||||||
|
},
|
||||||
|
"plan_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.TaskType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "waiting"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"plan.UpdatePlanRequest": {
|
"plan.UpdatePlanRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"content_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanContentType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "tasks"
|
||||||
|
},
|
||||||
|
"cron_expression": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "0 0 6 * * *"
|
||||||
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "更新后的描述"
|
"example": "更新后的描述"
|
||||||
},
|
},
|
||||||
|
"execution_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanExecutionType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "automatic"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "猪舍温度控制计划V2"
|
"example": "猪舍温度控制计划V2"
|
||||||
|
},
|
||||||
|
"sub_plan_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.TaskRequest"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -539,19 +539,106 @@
|
|||||||
"DeviceTypeDevice"
|
"DeviceTypeDevice"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"models.PlanContentType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"sub_plans",
|
||||||
|
"tasks"
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"PlanContentTypeSubPlans": "计划包含子计划",
|
||||||
|
"PlanContentTypeTasks": "计划包含任务"
|
||||||
|
},
|
||||||
|
"x-enum-descriptions": [
|
||||||
|
"计划包含子计划",
|
||||||
|
"计划包含任务"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"PlanContentTypeSubPlans",
|
||||||
|
"PlanContentTypeTasks"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"models.PlanExecutionType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"automatic",
|
||||||
|
"manual"
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"PlanExecutionTypeAutomatic": "自动执行 (包含定时和循环)",
|
||||||
|
"PlanExecutionTypeManual": "手动执行"
|
||||||
|
},
|
||||||
|
"x-enum-descriptions": [
|
||||||
|
"自动执行 (包含定时和循环)",
|
||||||
|
"手动执行"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"PlanExecutionTypeAutomatic",
|
||||||
|
"PlanExecutionTypeManual"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"models.TaskType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"waiting"
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"TaskTypeWaiting": "等待任务"
|
||||||
|
},
|
||||||
|
"x-enum-descriptions": [
|
||||||
|
"等待任务"
|
||||||
|
],
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"TaskTypeWaiting"
|
||||||
|
]
|
||||||
|
},
|
||||||
"plan.CreatePlanRequest": {
|
"plan.CreatePlanRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
|
"content_type",
|
||||||
|
"execution_type",
|
||||||
"name"
|
"name"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"content_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanContentType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "tasks"
|
||||||
|
},
|
||||||
|
"cron_expression": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "0 0 6 * * *"
|
||||||
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "根据温度自动调节风扇和加热器"
|
"example": "根据温度自动调节风扇和加热器"
|
||||||
},
|
},
|
||||||
|
"execution_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanExecutionType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "automatic"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "猪舍温度控制计划"
|
"example": "猪舍温度控制计划"
|
||||||
|
},
|
||||||
|
"sub_plan_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.TaskRequest"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -573,10 +660,30 @@
|
|||||||
"plan.PlanResponse": {
|
"plan.PlanResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"content_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanContentType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "tasks"
|
||||||
|
},
|
||||||
|
"cron_expression": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "0 0 6 * * *"
|
||||||
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "根据温度自动调节风扇和加热器"
|
"example": "根据温度自动调节风扇和加热器"
|
||||||
},
|
},
|
||||||
|
"execution_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanExecutionType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "automatic"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"example": 1
|
"example": 1
|
||||||
@@ -584,19 +691,151 @@
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "猪舍温度控制计划"
|
"example": "猪舍温度控制计划"
|
||||||
|
},
|
||||||
|
"sub_plans": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.SubPlanResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.TaskResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plan.SubPlanResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"child_plan": {
|
||||||
|
"$ref": "#/definitions/plan.PlanResponse"
|
||||||
|
},
|
||||||
|
"child_plan_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 2
|
||||||
|
},
|
||||||
|
"execution_order": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"parent_plan_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plan.TaskRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开1号风扇"
|
||||||
|
},
|
||||||
|
"execution_order": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开风扇"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"$ref": "#/definitions/controller.Properties"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.TaskType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "waiting"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plan.TaskResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开1号风扇"
|
||||||
|
},
|
||||||
|
"execution_order": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "打开风扇"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"$ref": "#/definitions/controller.Properties"
|
||||||
|
},
|
||||||
|
"plan_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.TaskType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "waiting"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"plan.UpdatePlanRequest": {
|
"plan.UpdatePlanRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"content_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanContentType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "tasks"
|
||||||
|
},
|
||||||
|
"cron_expression": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "0 0 6 * * *"
|
||||||
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "更新后的描述"
|
"example": "更新后的描述"
|
||||||
},
|
},
|
||||||
|
"execution_type": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.PlanExecutionType"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"example": "automatic"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "猪舍温度控制计划V2"
|
"example": "猪舍温度控制计划V2"
|
||||||
|
},
|
||||||
|
"sub_plan_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/plan.TaskRequest"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -79,15 +79,74 @@ definitions:
|
|||||||
x-enum-varnames:
|
x-enum-varnames:
|
||||||
- DeviceTypeAreaController
|
- DeviceTypeAreaController
|
||||||
- DeviceTypeDevice
|
- DeviceTypeDevice
|
||||||
|
models.PlanContentType:
|
||||||
|
enum:
|
||||||
|
- sub_plans
|
||||||
|
- tasks
|
||||||
|
type: string
|
||||||
|
x-enum-comments:
|
||||||
|
PlanContentTypeSubPlans: 计划包含子计划
|
||||||
|
PlanContentTypeTasks: 计划包含任务
|
||||||
|
x-enum-descriptions:
|
||||||
|
- 计划包含子计划
|
||||||
|
- 计划包含任务
|
||||||
|
x-enum-varnames:
|
||||||
|
- PlanContentTypeSubPlans
|
||||||
|
- PlanContentTypeTasks
|
||||||
|
models.PlanExecutionType:
|
||||||
|
enum:
|
||||||
|
- automatic
|
||||||
|
- manual
|
||||||
|
type: string
|
||||||
|
x-enum-comments:
|
||||||
|
PlanExecutionTypeAutomatic: 自动执行 (包含定时和循环)
|
||||||
|
PlanExecutionTypeManual: 手动执行
|
||||||
|
x-enum-descriptions:
|
||||||
|
- 自动执行 (包含定时和循环)
|
||||||
|
- 手动执行
|
||||||
|
x-enum-varnames:
|
||||||
|
- PlanExecutionTypeAutomatic
|
||||||
|
- PlanExecutionTypeManual
|
||||||
|
models.TaskType:
|
||||||
|
enum:
|
||||||
|
- waiting
|
||||||
|
type: string
|
||||||
|
x-enum-comments:
|
||||||
|
TaskTypeWaiting: 等待任务
|
||||||
|
x-enum-descriptions:
|
||||||
|
- 等待任务
|
||||||
|
x-enum-varnames:
|
||||||
|
- TaskTypeWaiting
|
||||||
plan.CreatePlanRequest:
|
plan.CreatePlanRequest:
|
||||||
properties:
|
properties:
|
||||||
|
content_type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.PlanContentType'
|
||||||
|
example: tasks
|
||||||
|
cron_expression:
|
||||||
|
example: 0 0 6 * * *
|
||||||
|
type: string
|
||||||
description:
|
description:
|
||||||
example: 根据温度自动调节风扇和加热器
|
example: 根据温度自动调节风扇和加热器
|
||||||
type: string
|
type: string
|
||||||
|
execution_type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.PlanExecutionType'
|
||||||
|
example: automatic
|
||||||
name:
|
name:
|
||||||
example: 猪舍温度控制计划
|
example: 猪舍温度控制计划
|
||||||
type: string
|
type: string
|
||||||
|
sub_plan_ids:
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
type: array
|
||||||
|
tasks:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/plan.TaskRequest'
|
||||||
|
type: array
|
||||||
required:
|
required:
|
||||||
|
- content_type
|
||||||
|
- execution_type
|
||||||
- name
|
- name
|
||||||
type: object
|
type: object
|
||||||
plan.ListPlansResponse:
|
plan.ListPlansResponse:
|
||||||
@@ -102,24 +161,121 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
plan.PlanResponse:
|
plan.PlanResponse:
|
||||||
properties:
|
properties:
|
||||||
|
content_type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.PlanContentType'
|
||||||
|
example: tasks
|
||||||
|
cron_expression:
|
||||||
|
example: 0 0 6 * * *
|
||||||
|
type: string
|
||||||
description:
|
description:
|
||||||
example: 根据温度自动调节风扇和加热器
|
example: 根据温度自动调节风扇和加热器
|
||||||
type: string
|
type: string
|
||||||
|
execution_type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.PlanExecutionType'
|
||||||
|
example: automatic
|
||||||
id:
|
id:
|
||||||
example: 1
|
example: 1
|
||||||
type: integer
|
type: integer
|
||||||
name:
|
name:
|
||||||
example: 猪舍温度控制计划
|
example: 猪舍温度控制计划
|
||||||
type: string
|
type: string
|
||||||
|
sub_plans:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/plan.SubPlanResponse'
|
||||||
|
type: array
|
||||||
|
tasks:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/plan.TaskResponse'
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
plan.SubPlanResponse:
|
||||||
|
properties:
|
||||||
|
child_plan:
|
||||||
|
$ref: '#/definitions/plan.PlanResponse'
|
||||||
|
child_plan_id:
|
||||||
|
example: 2
|
||||||
|
type: integer
|
||||||
|
execution_order:
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
id:
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
parent_plan_id:
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
plan.TaskRequest:
|
||||||
|
properties:
|
||||||
|
description:
|
||||||
|
example: 打开1号风扇
|
||||||
|
type: string
|
||||||
|
execution_order:
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
example: 打开风扇
|
||||||
|
type: string
|
||||||
|
parameters:
|
||||||
|
$ref: '#/definitions/controller.Properties'
|
||||||
|
type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.TaskType'
|
||||||
|
example: waiting
|
||||||
|
type: object
|
||||||
|
plan.TaskResponse:
|
||||||
|
properties:
|
||||||
|
description:
|
||||||
|
example: 打开1号风扇
|
||||||
|
type: string
|
||||||
|
execution_order:
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
id:
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
example: 打开风扇
|
||||||
|
type: string
|
||||||
|
parameters:
|
||||||
|
$ref: '#/definitions/controller.Properties'
|
||||||
|
plan_id:
|
||||||
|
example: 1
|
||||||
|
type: integer
|
||||||
|
type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.TaskType'
|
||||||
|
example: waiting
|
||||||
type: object
|
type: object
|
||||||
plan.UpdatePlanRequest:
|
plan.UpdatePlanRequest:
|
||||||
properties:
|
properties:
|
||||||
|
content_type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.PlanContentType'
|
||||||
|
example: tasks
|
||||||
|
cron_expression:
|
||||||
|
example: 0 0 6 * * *
|
||||||
|
type: string
|
||||||
description:
|
description:
|
||||||
example: 更新后的描述
|
example: 更新后的描述
|
||||||
type: string
|
type: string
|
||||||
|
execution_type:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.PlanExecutionType'
|
||||||
|
example: automatic
|
||||||
name:
|
name:
|
||||||
example: 猪舍温度控制计划V2
|
example: 猪舍温度控制计划V2
|
||||||
type: string
|
type: string
|
||||||
|
sub_plan_ids:
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
type: array
|
||||||
|
tasks:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/plan.TaskRequest'
|
||||||
|
type: array
|
||||||
type: object
|
type: object
|
||||||
user.CreateUserRequest:
|
user.CreateUserRequest:
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
Reference in New Issue
Block a user