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

@@ -38,6 +38,7 @@ func NewController(logger *logs.Logger, planRepo repository.PlanRepository, anal
// @Summary 创建计划
// @Description 创建一个新的计划,包括其基本信息和所有关联的子计划/任务。
// @Tags 计划管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param plan body dto.CreatePlanRequest true "计划信息"
@@ -98,6 +99,7 @@ func (c *Controller) CreatePlan(ctx *gin.Context) {
// @Summary 获取计划详情
// @Description 根据计划ID获取单个计划的详细信息。
// @Tags 计划管理
// @Security BearerAuth
// @Produce json
// @Param id path int true "计划ID"
// @Success 200 {object} controller.Response{data=dto.PlanResponse} "业务码为200代表成功获取"
@@ -145,6 +147,7 @@ func (c *Controller) GetPlan(ctx *gin.Context) {
// @Summary 获取计划列表
// @Description 获取所有计划的列表
// @Tags 计划管理
// @Security BearerAuth
// @Produce json
// @Success 200 {object} controller.Response{data=[]dto.PlanResponse} "业务码为200代表成功获取列表"
// @Router /api/v1/plans [get]
@@ -183,6 +186,7 @@ func (c *Controller) ListPlans(ctx *gin.Context) {
// @Summary 更新计划
// @Description 根据计划ID更新计划的详细信息。
// @Tags 计划管理
// @Security BearerAuth
// @Accept json
// @Produce json
// @Param id path int true "计划ID"
@@ -280,6 +284,7 @@ func (c *Controller) UpdatePlan(ctx *gin.Context) {
// @Summary 删除计划
// @Description 根据计划ID删除计划。软删除
// @Tags 计划管理
// @Security BearerAuth
// @Produce json
// @Param id path int true "计划ID"
// @Success 200 {object} controller.Response "业务码为200代表删除成功"
@@ -333,6 +338,7 @@ func (c *Controller) DeletePlan(ctx *gin.Context) {
// @Summary 启动计划
// @Description 根据计划ID启动一个计划的执行。
// @Tags 计划管理
// @Security BearerAuth
// @Produce json
// @Param id path int true "计划ID"
// @Success 200 {object} controller.Response "业务码为200代表成功启动计划"
@@ -412,6 +418,7 @@ func (c *Controller) StartPlan(ctx *gin.Context) {
// @Summary 停止计划
// @Description 根据计划ID停止一个正在执行的计划。
// @Tags 计划管理
// @Security BearerAuth
// @Produce json
// @Param id path int true "计划ID"
// @Success 200 {object} controller.Response "业务码为200代表成功停止计划"