package workflow

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

type ApproverRouter struct{}

func (s *ApproverRouter) InitApproverRouter(Router *gin.RouterGroup) {
	approverRouter := Router.Group("approver").Use(middleware.OperationRecord())
	approverRouterWithoutRecord := Router.Group("approver")

	approverApi := v1.ApiGroupApp.WorkflowApiGroup.ApproverApi
	{
		approverRouter.POST("createApprover", approverApi.CreateApprover)
		approverRouter.PUT("updateApprover", approverApi.UpdateApprover)
		approverRouter.DELETE("deleteApprover", approverApi.DeleteApprover)
	}
	{
		approverRouterWithoutRecord.GET("queryAllApprover", approverApi.QueryAllApprover)
		approverRouterWithoutRecord.POST("queryApproverList", approverApi.QueryApproverList)
	}
}
