30 lines
1.1 KiB
Go
30 lines
1.1 KiB
Go
package router
|
|
|
|
import (
|
|
"kra/internal/modules/system/transport/handler"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func RegisterOrganization(group *gin.RouterGroup, h *handler.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)
|
|
}
|