package system

import (
	"kra/internal/server/middleware"

	"github.com/gin-gonic/gin"
)

type DictionaryRouter struct{}

func (r *DictionaryRouter) InitDictionaryRouter(Router *gin.RouterGroup) {
	dictionaryRouter := Router.Group("sysDictionary").Use(middleware.OperationRecordMiddleware())
	dictionaryRouterWithoutRecord := Router.Group("sysDictionary")
	{
		dictionaryRouter.POST("createSysDictionary", dictionaryApi.CreateSysDictionary)
		dictionaryRouter.DELETE("deleteSysDictionary", dictionaryApi.DeleteSysDictionary)
		dictionaryRouter.PUT("updateSysDictionary", dictionaryApi.UpdateSysDictionary)
		dictionaryRouter.POST("importSysDictionary", dictionaryApi.ImportSysDictionary)
		dictionaryRouter.GET("exportSysDictionary", dictionaryApi.ExportSysDictionary)
	}
	{
		dictionaryRouterWithoutRecord.GET("findSysDictionary", dictionaryApi.FindSysDictionary)
		dictionaryRouterWithoutRecord.GET("getSysDictionaryList", dictionaryApi.GetSysDictionaryList)
	}
}
