支持主流数据库的代码生成

This commit is contained in:
YunaiV
2022-04-29 23:14:34 +08:00
parent f1069aa306
commit b34e2691f8
31 changed files with 283 additions and 1031 deletions

View File

@ -73,26 +73,11 @@ export function getSchemaTableList(query) {
}
// 基于数据库的表结构,创建代码生成器的表定义
export function createCodegenListFromDB(tableNames) {
export function createCodegenList(data) {
return request({
url: '/infra/codegen/create-list-from-db',
url: '/infra/codegen/create-list',
method: 'post',
headers:{
'Content-type': 'application/x-www-form-urlencoded'
},
data: 'tableNames=' + tableNames
})
}
// 基于 SQL 建表语句,创建代码生成器的表定义
export function createCodegenListFromSQL(data) {
return request({
url: '/infra/codegen/create-list-from-sql',
method: 'post',
headers:{
'Content-type': 'application/x-www-form-urlencoded'
},
data: 'sql=' + data.sql,
data: data
})
}