12345678910111213141516171819 |
- package routers
- import (
- "Medical_ERP/controllers"
- beego "github.com/beego/beego/v2/server/web"
- )
- func init() {
- // 生产企业
- enterprise := beego.NewNamespace("/api/enterprise",
- beego.NSRouter("/list", &controllers.EnterpriseController{}, "*:List"),
- beego.NSRouter("/detail", &controllers.EnterpriseController{}, "*:Detail"),
- beego.NSRouter("/add", &controllers.EnterpriseController{}, "*:Add"),
- beego.NSRouter("/edit", &controllers.EnterpriseController{}, "*:Edit"),
- beego.NSRouter("/delete", &controllers.EnterpriseController{}, "*:Delete"),
- )
- //注册 namespace
- beego.AddNamespace(enterprise)
- }
|