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
773 B

3 years ago
  1. package system
  2. import (
  3. v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type AutoCodeRouter struct{}
  7. func (s *AutoCodeRouter) InitAutoCodeRouter(Router *gin.RouterGroup) {
  8. autoCodeRouter := Router.Group("autoCode")
  9. autoCodeApi := v1.ApiGroupApp.SystemApiGroup.AutoCodeApi
  10. {
  11. autoCodeRouter.GET("getDB", autoCodeApi.GetDB) // 获取数据库
  12. autoCodeRouter.GET("getTables", autoCodeApi.GetTables) // 获取对应数据库的表
  13. autoCodeRouter.GET("getColumn", autoCodeApi.GetColumn) // 获取指定表所有字段信息
  14. autoCodeRouter.POST("preview", autoCodeApi.PreviewTemp) // 获取自动创建代码预览
  15. autoCodeRouter.POST("createTemp", autoCodeApi.CreateTemp) // 创建自动化代码
  16. }
  17. }