package workflow

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

type ProcessRouter struct{}

func (s *ProcessRouter) InitProcessRouter(Router *gin.RouterGroup) {
	processRouter := Router.Group("process").Use(middleware.OperationRecord())
	processRouterWithoutRecord := Router.Group("process")

	processApi := v1.ApiGroupApp.WorkflowApiGroup.ProcessApi
	{
		processRouter.POST("createProcess", processApi.CreateProcess)
		processRouter.PUT("updateProcess", processApi.UpdateProcess)
		processRouter.DELETE("deleteProcess", processApi.DeleteProcess)
	}
	{
		processRouterWithoutRecord.GET("queryAllProcess", processApi.QueryAllProcess)
		processRouterWithoutRecord.POST("queryProcessList", processApi.QueryProcessList)
	}
}
