增加基于 SQL 导入表结构
This commit is contained in:
@@ -12,4 +12,14 @@ public interface ToolErrorCodeConstants {
|
||||
// ========== 字典类型(测试) 1003000000 ==========
|
||||
ErrorCode TEST_DEMO_NOT_EXISTS = new ErrorCode(1003000000, "测试示例不存在");
|
||||
|
||||
// ========== 代码生成器 1003001000 ==========
|
||||
ErrorCode CODEGEN_TABLE_EXISTS = new ErrorCode(1003001000, "表定义已经存在");
|
||||
ErrorCode CODEGEN_IMPORT_TABLE_NULL = new ErrorCode(1003001001, "导入的表不存在");
|
||||
ErrorCode CODEGEN_IMPORT_COLUMNS_NULL = new ErrorCode(1003001002, "导入的字段不存在");
|
||||
ErrorCode CODEGEN_PARSE_SQL_ERROR = new ErrorCode(1003001003, "解析 SQL 失败,请检查");
|
||||
ErrorCode CODEGEN_TABLE_NOT_EXISTS = new ErrorCode(1003001004, "表定义不存在");
|
||||
ErrorCode CODEGEN_COLUMN_NOT_EXISTS = new ErrorCode(1003001005, "字段义不存在");
|
||||
ErrorCode CODEGEN_SYNC_COLUMNS_NULL = new ErrorCode(1003001006, "同步的字段不存在");
|
||||
ErrorCode CODEGEN_SYNC_NONE_CHANGE = new ErrorCode(1003001007, "同步失败,不存在改变");
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package cn.iocoder.dashboard.modules.tool.enums.codegen;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 代码生成的导入类型
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ToolCodegenImportTypeEnum {
|
||||
|
||||
DB(1), // 从 information_schema 的 table 和 columns 表导入
|
||||
SQL(2); // 基于建表 SQL 语句导入
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private final Integer type;
|
||||
|
||||
}
|
||||
@@ -14,8 +14,6 @@ public enum ToolCodegenTemplateTypeEnum {
|
||||
|
||||
CRUD(1), // 单表(增删改查)
|
||||
TREE(2), // 树表(增删改查)
|
||||
// TODO 主子表,暂时不考虑支持。原因是较为灵活,形态较多,很难评估。
|
||||
SUB(3) // 主子表(增删改查)
|
||||
;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user