enterprise.go 619 B

12345678910111213141516171819
  1. package routers
  2. import (
  3. "Medical_ERP/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. // 生产企业
  8. enterprise := beego.NewNamespace("/api/enterprise",
  9. beego.NSRouter("/list", &controllers.EnterpriseController{}, "*:List"),
  10. beego.NSRouter("/detail", &controllers.EnterpriseController{}, "*:Detail"),
  11. beego.NSRouter("/add", &controllers.EnterpriseController{}, "*:Add"),
  12. beego.NSRouter("/edit", &controllers.EnterpriseController{}, "*:Edit"),
  13. beego.NSRouter("/delete", &controllers.EnterpriseController{}, "*:Delete"),
  14. )
  15. //注册 namespace
  16. beego.AddNamespace(enterprise)
  17. }