dosage_form.go 614 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. dosageForm := beego.NewNamespace("/api/dosage-form",
  9. beego.NSRouter("/list", &controllers.DosageFormController{}, "*:List"),
  10. beego.NSRouter("/detail", &controllers.DosageFormController{}, "*:Detail"),
  11. beego.NSRouter("/add", &controllers.DosageFormController{}, "*:Add"),
  12. beego.NSRouter("/edit", &controllers.DosageFormController{}, "*:Edit"),
  13. beego.NSRouter("/delete", &controllers.DosageFormController{}, "*:Delete"),
  14. )
  15. //注册 namespace
  16. beego.AddNamespace(dosageForm)
  17. }