表结构文档导出

This commit is contained in:
lzy
2023-09-12 15:36:13 +08:00
parent 0c1d38e036
commit f1ecfbed87
35 changed files with 1676 additions and 12 deletions

View File

@ -0,0 +1,33 @@
package ai.chat2db.server.domain.api.enums;
import lombok.Getter;
/**
* ExportFileType
*
* @author lzy
**/
@Getter
public enum ExportFileSuffix {
//word
WORD(".docx"),
//excel
EXCEL(".xlsx"),
//markdown
MARKDOWN(".md"),
//html
HTML(".html"),
//pdf
PDF(".pdf");
private String suffix;
ExportFileSuffix(String suffix) {
this.suffix = suffix;
}
public void setSuffix(String suffix) {
this.suffix = suffix;
}
}

View File

@ -3,6 +3,8 @@ package ai.chat2db.server.domain.api.enums;
import ai.chat2db.server.tools.base.enums.BaseEnum;
import lombok.Getter;
import javax.swing.text.html.HTML;
/**
* export type
*
@ -20,7 +22,30 @@ public enum ExportTypeEnum implements BaseEnum<String> {
*/
INSERT("INSERT"),
;
/**
* WORD
*/
WORD("WORD"),
/**
* EXCEL
*/
EXCEL("EXCEL"),
/**
* HTML
*/
HTML("HTML"),
/**
* MARKDOWN
*/
MARKDOWN("MARKDOWN"),
/**
* PDF
*/
PDF("PDF");
final String description;

View File

@ -0,0 +1,34 @@
package ai.chat2db.server.domain.api.model;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 索引导出信息
*
* @author lzy
*/
@Data
@Accessors(chain = true)
public class IndexInfo {
/**
* 索引名称
*/
private String name;
/**
* 字段
*/
private String columnName;
/**
* 索引类型
*/
private String indexType;
/**
* 索引方法
*/
private String indexMethod;
/**
* 注释
*/
private String comment;
}

View File

@ -0,0 +1,47 @@
package ai.chat2db.server.domain.api.model;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* TableParameter
*
* @author lzy
**/
@Data
@Accessors(chain = true)
public class TableParameter {
/**
* 序号
**/
private String no;
/**
* 字段名
**/
private String fieldName;
/**
* 数据类型
**/
private String columnType;
/**
* 长度
**/
private String length;
/**
* 不是null
**/
private String isNullAble;
/**
* 默认值
**/
private String columnDefault;
/**
* 小数位
**/
private String decimalPlaces;
/**
* 备注
**/
private String columnComment;
}