sys_auto_code.go 1.1 KB

12345678910111213141516171819202122232425
  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. }