mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-08-02 05:20:15 +08:00
表结构文档导出
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
Reference in New Issue
Block a user