refactor: 代码生成临时提交

This commit is contained in:
ray
2024-07-14 23:33:11 +08:00
parent 9a8490d8c2
commit b65641220e
51 changed files with 1088 additions and 1185 deletions

View File

@@ -0,0 +1,29 @@
package com.youlai.system.model.form;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "代码生成配置")
@Data
public class GeneratorConfig {
@Schema(description = "表名")
private String tableName;
@Schema(description = "包名")
private String packageName;
@Schema(description = "模块名")
private String moduleName;
@Schema(description = "作者")
private String author;
@Schema(description = "表前缀")
private String tablePrefix;
@Schema(description = "是否覆盖")
private Boolean cover;
}

View File

@@ -0,0 +1,22 @@
package com.youlai.system.model.query;
import com.youlai.system.common.base.BasePageQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* 数据表分页查询对象
*
* @author Ray
* @since 2.10.0
*/
@Schema(description = "数据表分页查询对象")
@Getter
@Setter
public class TablePageQuery extends BasePageQuery {
@Schema(description="关键字(表名)")
private String keywords;
}

View File

@@ -0,0 +1,34 @@
package com.youlai.system.model.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "数据表字段VO")
@Data
public class TableColumnVO {
@Schema(description = "字段名称", example = "id")
private String columnName;
@Schema(description = "字段类型", example = "bigint")
private String dataType;
@Schema(description = "字段描述", example = "主键")
private String columnComment;
@Schema(description = "字段长度", example = "20")
private Integer characterMaximumLength;
@Schema(description = "是否主键(1-是 0-否)", example = "1")
private Integer isPrimaryKey;
@Schema(description = "是否可为空(1-是 0-否)", example = "1")
private String isNullable;
@Schema(description = "字符集", example = "utf8mb4")
private String characterSetName;
@Schema(description = "字符集排序规则", example = "utf8mb4_general_ci")
private String collationName;
}

View File

@@ -0,0 +1,19 @@
package com.youlai.system.model.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "表生成代码预览VO")
@Data
public class TableGeneratePreviewVO {
@Schema(description = "生成文件路径")
private String path;
@Schema(description = "生成文件名称",example = "SysUser.java" )
private String fileName;
@Schema(description = "生成文件内容")
private String content;
}

View File

@@ -0,0 +1,29 @@
package com.youlai.system.model.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "数据表分页VO")
@Data
public class TablePageVO {
@Schema(description = "数据表名称", example = "sys_user")
private String tableName;
@Schema(description = "数据表注释",example = "用户表")
private String tableComment;
@Schema(description = "数据表排序规则",example = "用户表")
private String tableCollation;
@Schema(description = "存储引擎",example = "InnoDB")
private String engine;
@Schema(description = "字符集",example = "utf8mb4_general_ci")
private String charset;
@Schema(description = "创建时间",example = "2023-08-08 08:08:08")
private String createTime;
}