package routers import ( "ERP_storage/controllers" beego "github.com/beego/beego/v2/server/web" ) func init() { depot := beego.NewNamespace("/Depot", beego.NSRouter("/List", &controllers.BasicController{}, "*:Depot_List"), // 仓库列表 beego.NSRouter("/Add", &controllers.BasicController{}, "*:Depot_Add"), // 获取仓库 beego.NSRouter("/Edit", &controllers.BasicController{}, "*:Depot_Edit"), // 添加仓库 beego.NSRouter("/Del", &controllers.BasicController{}, "*:Depot_Del"), // 删除仓库 ) product := beego.NewNamespace("/Product", beego.NSRouter("/List", &controllers.BasicController{}, "*:Product_List"), // 产品列表 beego.NSRouter("/Add", &controllers.BasicController{}, "*:Product_Add"), // 添加产品 beego.NSRouter("/Edit_Sort", &controllers.BasicController{}, "*:Product_Edit_Sort"), // 修改排序 beego.NSRouter("/Edit", &controllers.BasicController{}, "*:Product_Edit"), // 编辑产品 beego.NSRouter("/Del", &controllers.BasicController{}, "*:Product_Del"), // 删除产品 beego.NSRouter("/Spec_List", &controllers.BasicController{}, "*:ProductSpec_List"), // 产品规格 beego.NSRouter("/Model_List", &controllers.BasicController{}, "*:ProductModel_List"), // 产品型号 beego.NSRouter("/Name_List", &controllers.BasicController{}, "*:ProductName_List"), // 产品名称 ) productClass := beego.NewNamespace("/ProductClass", beego.NSRouter("/List", &controllers.BasicController{}, "*:ProductClass_List"), // 产品分类列表 beego.NSRouter("/Add", &controllers.BasicController{}, "*:ProductClass_Add"), // 获取产品分类 beego.NSRouter("/Edit", &controllers.BasicController{}, "*:ProductClass_Edit"), // 添加产品分类 beego.NSRouter("/Del", &controllers.BasicController{}, "*:ProductClass_Del"), // 删除产品分类 ) verifyItem := beego.NewNamespace("/VerifyItem", beego.NSRouter("/List", &controllers.BasicController{}, "*:VerifyItem_List"), // 验证项目列表 beego.NSRouter("/Add", &controllers.BasicController{}, "*:VerifyItem_Add"), // 获取验证项目 beego.NSRouter("/Edit", &controllers.BasicController{}, "*:VerifyItem_Edit"), // 添加验证项目 beego.NSRouter("/Del", &controllers.BasicController{}, "*:VerifyItem_Del"), // 删除验证项目 ) beego.AddNamespace(depot, product, productClass, verifyItem) }