23 lines
766 B
Go
23 lines
766 B
Go
package system
|
|
|
|
import (
|
|
"kra/internal/server/middleware"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type AutoCodeRouter struct{}
|
|
|
|
// InitAutoCodeRouter 初始化自动代码路由
|
|
func (s *AutoCodeRouter) InitAutoCodeRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
|
|
autoCodeRouter := Router.Group("autoCode").Use(middleware.OperationRecordMiddleware())
|
|
autoCodeRouterWithoutRecord := Router.Group("autoCode")
|
|
{
|
|
autoCodeRouterWithoutRecord.GET("getDB", autoCodeApi.GetDB) // 获取数据库
|
|
autoCodeRouterWithoutRecord.GET("getTables", autoCodeApi.GetTables) // 获取对应数据库的表
|
|
autoCodeRouterWithoutRecord.GET("getColumn", autoCodeApi.GetColumn) // 获取指定表所有字段信息
|
|
}
|
|
// 预留其他路由
|
|
_ = autoCodeRouter
|
|
}
|