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.

25 lines
1.1 KiB

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. }
  8. func (s *AutoCodeRouter) InitAutoCodeRouter(Router *gin.RouterGroup) {
  9. autoCodeRouter := Router.Group("autoCode")
  10. var authorityApi = v1.ApiGroupApp.SystemApiGroup.AutoCodeApi
  11. {
  12. autoCodeRouter.POST("delSysHistory", authorityApi.DelSysHistory) // 删除回滚记录
  13. autoCodeRouter.POST("getMeta", authorityApi.GetMeta) // 根据id获取meta信息
  14. autoCodeRouter.POST("getSysHistory", authorityApi.GetSysHistory) // 获取回滚记录分页
  15. autoCodeRouter.POST("rollback", authorityApi.RollBack) // 回滚
  16. autoCodeRouter.POST("preview", authorityApi.PreviewTemp) // 获取自动创建代码预览
  17. autoCodeRouter.POST("createTemp", authorityApi.CreateTemp) // 创建自动化代码
  18. autoCodeRouter.GET("getTables", authorityApi.GetTables) // 获取对应数据库的表
  19. autoCodeRouter.GET("getDB", authorityApi.GetDB) // 获取数据库
  20. autoCodeRouter.GET("getColumn", authorityApi.GetColumn) // 获取指定表所有字段信息
  21. }
  22. }