package workflow

import (
	"github.com/gin-gonic/gin"
	v1 "server/api/v1"
	"server/middleware"
)

type DescriptionRouter struct{}

func (s *DescriptionRouter) InitDescriptionRouter(Router *gin.RouterGroup) {
	descriptionRouter := Router.Group("description").Use(middleware.OperationRecord())
	descriptionRouterWithoutRecord := Router.Group("description")

	descriptionApi := v1.ApiGroupApp.WorkflowApiGroup.DescriptionApi
	{
		descriptionRouter.POST("createApprover", descriptionApi.CreateDescription)
		descriptionRouter.PUT("updateApprover", descriptionApi.UpdateDescription)
		descriptionRouter.DELETE("deleteApprover", descriptionApi.DeleteDescription)
	}
	{
		descriptionRouterWithoutRecord.GET("queryDescriptionByProjectProcessId", descriptionApi.QueryDescriptionByProjectProcessId)
	}
}
