package router

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

func RegisterOrganization(group *gin.RouterGroup, h *Organization) {
	departments := group.Group("/department")
	departments.POST("/getDepartmentList", h.ListDepartments)
	departments.POST("/createDepartment", h.CreateDepartment)
	departments.PUT("/updateDepartment", h.UpdateDepartment)
	departments.DELETE("/deleteDepartment", h.DeleteDepartment)
	departments.GET("/findDepartment", h.FindDepartment)
	departments.GET("/getDepartmentUsers", h.DepartmentUsers)
	departments.POST("/setDepartmentUsers", h.SetDepartmentUsers)
	group.POST("/user/setUserDepartments", h.SetUserDepartments)

	positions := group.Group("/position")
	positions.POST("/getPositionList", h.ListPositions)
	positions.POST("/createPosition", h.CreatePosition)
	positions.PUT("/updatePosition", h.UpdatePosition)
	positions.DELETE("/deletePosition", h.DeletePosition)
	positions.GET("/findPosition", h.FindPosition)
	positions.GET("/getPositionUsers", h.PositionUsers)
	positions.POST("/setPositionUsers", h.SetPositionUsers)
	group.POST("/user/setUserPositions", h.SetUserPositions)
}
