调整swag

This commit is contained in:
2025-10-13 14:15:38 +08:00
parent 8c0dc6c815
commit bcec36f7e2
13 changed files with 760 additions and 7 deletions

View File

@@ -1112,7 +1112,16 @@ definitions:
$ref: '#/definitions/models.SensorType'
type: object
info:
contact: {}
contact:
email: divano@example.com
name: Divano
url: http://www.example.com
description: 这是一个用于管理猪场设备的后端服务。
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
title: 猪场管理系统 API
version: "1.0"
paths:
/api/v1/area-controllers:
get:
@@ -1131,6 +1140,8 @@ paths:
$ref: '#/definitions/dto.AreaControllerResponse'
type: array
type: object
security:
- BearerAuth: []
summary: 获取所有区域主控列表
tags:
- 区域主控管理
@@ -1157,6 +1168,8 @@ paths:
data:
$ref: '#/definitions/dto.AreaControllerResponse'
type: object
security:
- BearerAuth: []
summary: 创建新区域主控
tags:
- 区域主控管理
@@ -1176,6 +1189,8 @@ paths:
description: OK
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 删除区域主控
tags:
- 区域主控管理
@@ -1199,6 +1214,8 @@ paths:
data:
$ref: '#/definitions/dto.AreaControllerResponse'
type: object
security:
- BearerAuth: []
summary: 获取区域主控信息
tags:
- 区域主控管理
@@ -1230,6 +1247,8 @@ paths:
data:
$ref: '#/definitions/dto.AreaControllerResponse'
type: object
security:
- BearerAuth: []
summary: 更新区域主控信息
tags:
- 区域主控管理
@@ -1250,6 +1269,8 @@ paths:
$ref: '#/definitions/dto.DeviceTemplateResponse'
type: array
type: object
security:
- BearerAuth: []
summary: 获取设备模板列表
tags:
- 设备模板管理
@@ -1276,6 +1297,8 @@ paths:
data:
$ref: '#/definitions/dto.DeviceTemplateResponse'
type: object
security:
- BearerAuth: []
summary: 创建新设备模板
tags:
- 设备模板管理
@@ -1295,6 +1318,8 @@ paths:
description: OK
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 删除设备模板
tags:
- 设备模板管理
@@ -1318,6 +1343,8 @@ paths:
data:
$ref: '#/definitions/dto.DeviceTemplateResponse'
type: object
security:
- BearerAuth: []
summary: 获取设备模板信息
tags:
- 设备模板管理
@@ -1349,6 +1376,8 @@ paths:
data:
$ref: '#/definitions/dto.DeviceTemplateResponse'
type: object
security:
- BearerAuth: []
summary: 更新设备模板信息
tags:
- 设备模板管理
@@ -1369,6 +1398,8 @@ paths:
$ref: '#/definitions/dto.DeviceResponse'
type: array
type: object
security:
- BearerAuth: []
summary: 获取设备列表
tags:
- 设备管理
@@ -1395,6 +1426,8 @@ paths:
data:
$ref: '#/definitions/dto.DeviceResponse'
type: object
security:
- BearerAuth: []
summary: 创建新设备
tags:
- 设备管理
@@ -1414,6 +1447,8 @@ paths:
description: OK
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 删除设备
tags:
- 设备管理
@@ -1437,6 +1472,8 @@ paths:
data:
$ref: '#/definitions/dto.DeviceResponse'
type: object
security:
- BearerAuth: []
summary: 获取设备信息
tags:
- 设备管理
@@ -1468,6 +1505,8 @@ paths:
data:
$ref: '#/definitions/dto.DeviceResponse'
type: object
security:
- BearerAuth: []
summary: 更新设备信息
tags:
- 设备管理
@@ -1495,6 +1534,8 @@ paths:
description: OK
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 手动控制设备
tags:
- 设备管理
@@ -1515,6 +1556,8 @@ paths:
$ref: '#/definitions/dto.PenResponse'
type: array
type: object
security:
- BearerAuth: []
summary: 获取猪栏列表
tags:
- 猪场管理
@@ -1541,6 +1584,8 @@ paths:
data:
$ref: '#/definitions/dto.PenResponse'
type: object
security:
- BearerAuth: []
summary: 创建猪栏
tags:
- 猪场管理
@@ -1560,6 +1605,8 @@ paths:
description: 删除成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 删除猪栏
tags:
- 猪场管理
@@ -1583,6 +1630,8 @@ paths:
data:
$ref: '#/definitions/dto.PenResponse'
type: object
security:
- BearerAuth: []
summary: 获取单个猪栏
tags:
- 猪场管理
@@ -1614,6 +1663,8 @@ paths:
data:
$ref: '#/definitions/dto.PenResponse'
type: object
security:
- BearerAuth: []
summary: 更新猪栏
tags:
- 猪场管理
@@ -1646,6 +1697,8 @@ paths:
data:
$ref: '#/definitions/dto.PenResponse'
type: object
security:
- BearerAuth: []
summary: 更新猪栏状态
tags:
- 猪场管理
@@ -1671,6 +1724,8 @@ paths:
$ref: '#/definitions/dto.PigBatchResponseDTO'
type: array
type: object
security:
- BearerAuth: []
summary: 获取猪批次列表
tags:
- 猪群管理
@@ -1697,6 +1752,8 @@ paths:
data:
$ref: '#/definitions/dto.PigBatchResponseDTO'
type: object
security:
- BearerAuth: []
summary: 创建猪批次
tags:
- 猪群管理
@@ -1716,6 +1773,8 @@ paths:
description: 删除成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 删除猪批次
tags:
- 猪群管理
@@ -1739,6 +1798,8 @@ paths:
data:
$ref: '#/definitions/dto.PigBatchResponseDTO'
type: object
security:
- BearerAuth: []
summary: 获取单个猪批次
tags:
- 猪群管理
@@ -1770,6 +1831,8 @@ paths:
data:
$ref: '#/definitions/dto.PigBatchResponseDTO'
type: object
security:
- BearerAuth: []
summary: 更新猪批次
tags:
- 猪群管理
@@ -1797,6 +1860,8 @@ paths:
description: 分配成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 为猪批次分配空栏
tags:
- 猪群管理
@@ -1824,6 +1889,8 @@ paths:
description: 买猪成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 处理买猪的业务逻辑
tags:
- 猪群管理
@@ -1851,6 +1918,8 @@ paths:
description: 移入成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 将猪只从“虚拟库存”移入指定猪栏
tags:
- 猪群管理
@@ -1878,6 +1947,8 @@ paths:
description: 划拨成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 将猪栏划拨到新批次
tags:
- 猪群管理
@@ -1905,6 +1976,8 @@ paths:
description: 记录成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 记录正常猪只淘汰事件
tags:
- 猪群管理
@@ -1932,6 +2005,8 @@ paths:
description: 记录成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 记录正常猪只死亡事件
tags:
- 猪群管理
@@ -1959,6 +2034,8 @@ paths:
description: 记录成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 记录病猪淘汰事件
tags:
- 猪群管理
@@ -1986,6 +2063,8 @@ paths:
description: 记录成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 记录病猪死亡事件
tags:
- 猪群管理
@@ -2013,6 +2092,8 @@ paths:
description: 记录成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 记录病猪康复事件
tags:
- 猪群管理
@@ -2040,6 +2121,8 @@ paths:
description: 记录成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 记录新增病猪事件
tags:
- 猪群管理
@@ -2064,6 +2147,8 @@ paths:
description: 移除成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 从猪批次移除空栏
tags:
- 猪群管理
@@ -2091,6 +2176,8 @@ paths:
description: 卖猪成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 处理卖猪的业务逻辑
tags:
- 猪群管理
@@ -2118,6 +2205,8 @@ paths:
description: 调栏成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 跨猪群调栏
tags:
- 猪群管理
@@ -2145,6 +2234,8 @@ paths:
description: 调栏成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 群内调栏
tags:
- 猪群管理
@@ -2165,6 +2256,8 @@ paths:
$ref: '#/definitions/dto.PigHouseResponse'
type: array
type: object
security:
- BearerAuth: []
summary: 获取猪舍列表
tags:
- 猪场管理
@@ -2191,6 +2284,8 @@ paths:
data:
$ref: '#/definitions/dto.PigHouseResponse'
type: object
security:
- BearerAuth: []
summary: 创建猪舍
tags:
- 猪场管理
@@ -2210,6 +2305,8 @@ paths:
description: 删除成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 删除猪舍
tags:
- 猪场管理
@@ -2233,6 +2330,8 @@ paths:
data:
$ref: '#/definitions/dto.PigHouseResponse'
type: object
security:
- BearerAuth: []
summary: 获取单个猪舍
tags:
- 猪场管理
@@ -2264,6 +2363,8 @@ paths:
data:
$ref: '#/definitions/dto.PigHouseResponse'
type: object
security:
- BearerAuth: []
summary: 更新猪舍
tags:
- 猪场管理
@@ -2284,6 +2385,8 @@ paths:
$ref: '#/definitions/dto.PlanResponse'
type: array
type: object
security:
- BearerAuth: []
summary: 获取计划列表
tags:
- 计划管理
@@ -2310,6 +2413,8 @@ paths:
data:
$ref: '#/definitions/dto.PlanResponse'
type: object
security:
- BearerAuth: []
summary: 创建计划
tags:
- 计划管理
@@ -2329,6 +2434,8 @@ paths:
description: 业务码为200代表删除成功
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 删除计划
tags:
- 计划管理
@@ -2352,6 +2459,8 @@ paths:
data:
$ref: '#/definitions/dto.PlanResponse'
type: object
security:
- BearerAuth: []
summary: 获取计划详情
tags:
- 计划管理
@@ -2383,6 +2492,8 @@ paths:
data:
$ref: '#/definitions/dto.PlanResponse'
type: object
security:
- BearerAuth: []
summary: 更新计划
tags:
- 计划管理
@@ -2402,6 +2513,8 @@ paths:
description: 业务码为200代表成功启动计划
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 启动计划
tags:
- 计划管理
@@ -2421,6 +2534,8 @@ paths:
description: 业务码为200代表成功停止计划
schema:
$ref: '#/definitions/controller.Response'
security:
- BearerAuth: []
summary: 停止计划
tags:
- 计划管理
@@ -2486,6 +2601,8 @@ paths:
data:
$ref: '#/definitions/dto.ListHistoryResponse'
type: object
security:
- BearerAuth: []
summary: 获取指定用户的操作历史
tags:
- 用户管理
@@ -2516,4 +2633,9 @@ paths:
summary: 用户登录
tags:
- 用户管理
securityDefinitions:
BearerAuth:
in: header
name: Authorization
type: apiKey
swagger: "2.0"