package user

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

type UsersTreeRouter struct {
}

// InitUsersTreeRouter 初始化 UsersTree 路由信息
func (s *UsersTreeRouter) InitUsersTreeRouter(Router *gin.RouterGroup) {
	usersTreeRouter := Router.Group("usersTree").Use(middleware.OperationRecord())
	usersTreeRouterWithoutRecord := Router.Group("usersTree")
	var usersTreeApi = v1.ApiGroupApp.UserApiGroup.UsersTreeApi
	{
		usersTreeRouter.POST("createUsersTree", usersTreeApi.CreateUsersTree)   // 新建UsersTree
		usersTreeRouter.DELETE("deleteUsersTree", usersTreeApi.DeleteUsersTree) // 删除UsersTree
		usersTreeRouter.DELETE("deleteUsersTreeByIds", usersTreeApi.DeleteUsersTreeByIds) // 批量删除UsersTree
		usersTreeRouter.PUT("updateUsersTree", usersTreeApi.UpdateUsersTree)    // 更新UsersTree
	}
	{
		usersTreeRouterWithoutRecord.GET("findUsersTree", usersTreeApi.FindUsersTree)        // 根据ID获取UsersTree
		usersTreeRouterWithoutRecord.GET("getUsersTreeList", usersTreeApi.GetUsersTreeList)  // 获取UsersTree列表
	}
}
