You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
628 B

  1. package router
  2. import (
  3. "gin-vue-admin/api/v1"
  4. "gin-vue-admin/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func InitAutoCodeRouter(Router *gin.RouterGroup) {
  8. AutoCodeRouter := Router.Group("autoCode").
  9. Use(middleware.JWTAuth()).
  10. Use(middleware.CasbinHandler()).
  11. Use(middleware.OperationRecord())
  12. {
  13. AutoCodeRouter.POST("createTemp", v1.CreateTemp) // 创建自动化代码
  14. AutoCodeRouter.GET("getTables", v1.GetTables) // 获取对应数据库的表
  15. AutoCodeRouter.GET("getDB", v1.GetDB) // 获取数据库
  16. AutoCodeRouter.GET("getColume", v1.GetColume) // 获取指定表所有字段信息
  17. }
  18. }