package routers import ( "ERP_ams/controllers" beego "github.com/beego/beego/v2/server/web" ) func init() { ns := beego.NewNamespace("/Leave", beego.NSRouter("/List", &controllers.LeaveController{}, "*:Leave_List"), // 请假列表 beego.NSRouter("/User_list", &controllers.LeaveController{}, "*:Leave_User_List"), // 获取请假 beego.NSRouter("/Finance_List", &controllers.LeaveController{}, "*:Leave_Finance_List"), // 财务列表 beego.NSRouter("/Add", &controllers.LeaveController{}, "*:Leave_Add"), // 添加请假 beego.NSRouter("/Deduct", &controllers.LeaveController{}, "*:Leave_Deduct"), // 扣除 beego.NSRouter("/Edit", &controllers.LeaveController{}, "*:Leave_Update"), // 修改请假 beego.NSRouter("/Approval", &controllers.LeaveController{}, "*:Leave_Approval"), // 请假审批 beego.NSRouter("/Del", &controllers.LeaveController{}, "*:Leave_Del"), // 删除请假 beego.NSRouter("/DaysOff", &controllers.LeaveController{}, "*:Leave_RemainingDaysOff"), // 剩余调休时长 beego.NSRouter("/Duration", &controllers.LeaveController{}, "*:Leave_Duration"), // 剩余调休时长 ) // 请假类型 ns_tp := beego.NewNamespace("/LeaveType", beego.NSRouter("/List", &controllers.LeaveController{}, "*:Leave_Type_List"), // 添加权限-请假类型列表 ) beego.AddNamespace(ns, ns_tp) }