调整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

@@ -48,6 +48,7 @@ func NewController(
// @Summary 创建新设备
// @Description 根据提供的信息创建一个新设备
// @Tags 设备管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param device body dto.CreateDeviceRequest true "设备信息"
@@ -111,6 +112,7 @@ func (c *Controller) CreateDevice(ctx *gin.Context) {
// @Summary 获取设备信息
// @Description 根据设备ID获取单个设备的详细信息
// @Tags 设备管理
// @Security BearerAuth
// @Produce json
// @Param id path string true "设备ID"
// @Success 200 {object} controller.Response{data=dto.DeviceResponse}
@@ -157,6 +159,7 @@ func (c *Controller) GetDevice(ctx *gin.Context) {
// @Summary 获取设备列表
// @Description 获取系统中所有设备的列表
// @Tags 设备管理
// @Security BearerAuth
// @Produce json
// @Success 200 {object} controller.Response{data=[]dto.DeviceResponse}
// @Router /api/v1/devices [get]
@@ -184,6 +187,7 @@ func (c *Controller) ListDevices(ctx *gin.Context) {
// @Summary 更新设备信息
// @Description 根据设备ID更新一个已存在的设备信息
// @Tags 设备管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param id path string true "设备ID"
@@ -265,6 +269,7 @@ func (c *Controller) UpdateDevice(ctx *gin.Context) {
// @Summary 删除设备
// @Description 根据设备ID删除一个设备软删除
// @Tags 设备管理
// @Security BearerAuth
// @Produce json
// @Param id path string true "设备ID"
// @Success 200 {object} controller.Response
@@ -306,6 +311,7 @@ func (c *Controller) DeleteDevice(ctx *gin.Context) {
// @Summary 手动控制设备
// @Description 根据设备ID和指定的动作开启或关闭来手动控制设备
// @Tags 设备管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param id path string true "设备ID"
@@ -369,6 +375,7 @@ func (c *Controller) ManualControl(ctx *gin.Context) {
// @Summary 创建新区域主控
// @Description 根据提供的信息创建一个新区域主控
// @Tags 区域主控管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param areaController body dto.CreateAreaControllerRequest true "区域主控信息"
@@ -424,6 +431,7 @@ func (c *Controller) CreateAreaController(ctx *gin.Context) {
// @Summary 获取区域主控信息
// @Description 根据ID获取单个区域主控的详细信息
// @Tags 区域主控管理
// @Security BearerAuth
// @Produce json
// @Param id path string true "区域主控ID"
// @Success 200 {object} controller.Response{data=dto.AreaControllerResponse}
@@ -466,6 +474,7 @@ func (c *Controller) GetAreaController(ctx *gin.Context) {
// @Summary 获取所有区域主控列表
// @Description 获取系统中所有区域主控的列表
// @Tags 区域主控管理
// @Security BearerAuth
// @Produce json
// @Success 200 {object} controller.Response{data=[]dto.AreaControllerResponse}
// @Router /api/v1/area-controllers [get]
@@ -493,6 +502,7 @@ func (c *Controller) ListAreaControllers(ctx *gin.Context) {
// @Summary 更新区域主控信息
// @Description 根据ID更新一个已存在的区域主控信息
// @Tags 区域主控管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param id path string true "区域主控ID"
@@ -568,6 +578,7 @@ func (c *Controller) UpdateAreaController(ctx *gin.Context) {
// @Summary 删除区域主控
// @Description 根据ID删除一个区域主控软删除
// @Tags 区域主控管理
// @Security BearerAuth
// @Produce json
// @Param id path string true "区域主控ID"
// @Success 200 {object} controller.Response
@@ -611,6 +622,7 @@ func (c *Controller) DeleteAreaController(ctx *gin.Context) {
// @Summary 创建新设备模板
// @Description 根据提供的信息创建一个新设备模板
// @Tags 设备模板管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param deviceTemplate body dto.CreateDeviceTemplateRequest true "设备模板信息"
@@ -675,6 +687,7 @@ func (c *Controller) CreateDeviceTemplate(ctx *gin.Context) {
// @Summary 获取设备模板信息
// @Description 根据设备模板ID获取单个设备模板的详细信息
// @Tags 设备模板管理
// @Security BearerAuth
// @Produce json
// @Param id path string true "设备模板ID"
// @Success 200 {object} controller.Response{data=dto.DeviceTemplateResponse}
@@ -717,6 +730,7 @@ func (c *Controller) GetDeviceTemplate(ctx *gin.Context) {
// @Summary 获取设备模板列表
// @Description 获取系统中所有设备模板的列表
// @Tags 设备模板管理
// @Security BearerAuth
// @Produce json
// @Success 200 {object} controller.Response{data=[]dto.DeviceTemplateResponse}
// @Router /api/v1/device-templates [get]
@@ -744,6 +758,7 @@ func (c *Controller) ListDeviceTemplates(ctx *gin.Context) {
// @Summary 更新设备模板信息
// @Description 根据设备模板ID更新一个已存在的设备模板信息
// @Tags 设备模板管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param id path string true "设备模板ID"
@@ -828,6 +843,7 @@ func (c *Controller) UpdateDeviceTemplate(ctx *gin.Context) {
// @Summary 删除设备模板
// @Description 根据设备模板ID删除一个设备模板软删除
// @Tags 设备模板管理
// @Security BearerAuth
// @Produce json
// @Param id path string true "设备模板ID"
// @Success 200 {object} controller.Response