feat: 添加代码生成功能
This commit is contained in:
107
types/generate.d.ts
vendored
Normal file
107
types/generate.d.ts
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
/**生成表基本信息 */
|
||||
export interface TableInfo {
|
||||
/**数据ID*/
|
||||
id: string;
|
||||
/**表名 */
|
||||
table_name: string;
|
||||
/**表注释 */
|
||||
table_comment: string;
|
||||
/**数据表行数 */
|
||||
table_rows: number;
|
||||
/**数据表大小 */
|
||||
data_length: string;
|
||||
/**索引大小 */
|
||||
index_length: string;
|
||||
/**创建时间 */
|
||||
create_time: string;
|
||||
/**修改时间 */
|
||||
update_time: string;
|
||||
}
|
||||
|
||||
/**生成表信息 */
|
||||
export interface GenerateTableInfo {
|
||||
/**数据ID */
|
||||
id: string;
|
||||
/**作者 */
|
||||
author: string;
|
||||
/**类名 */
|
||||
class_name: string;
|
||||
/**权限ID */
|
||||
permission_id: string;
|
||||
/**API前缀 */
|
||||
prefix: string;
|
||||
/**备注 */
|
||||
remark: string;
|
||||
/**描述 */
|
||||
description: string;
|
||||
/**表名 */
|
||||
table_name: string;
|
||||
/**表注释 */
|
||||
table_comment: string;
|
||||
/**创建时间 */
|
||||
create_time: string;
|
||||
/**修改时间 */
|
||||
update_time: string;
|
||||
}
|
||||
|
||||
/**生成表字段信息 */
|
||||
export interface TableColumnInfo {
|
||||
/**数据ID */
|
||||
id: string;
|
||||
/**表ID */
|
||||
table_id: string;
|
||||
/**表名 */
|
||||
table_name: string;
|
||||
/**字段名 */
|
||||
column_name: string;
|
||||
/**字段注释 */
|
||||
column_comment: string;
|
||||
/**字段类型 */
|
||||
column_type: string;
|
||||
/**python 类型 */
|
||||
python_type: string;
|
||||
/**python字段名 */
|
||||
python_name: string;
|
||||
/**是否插入 */
|
||||
is_insert: boolean;
|
||||
/**是否编辑 */
|
||||
is_edit: boolean;
|
||||
/**是否查询 */
|
||||
is_query: boolean;
|
||||
/**是否列表显示 */
|
||||
is_list: boolean;
|
||||
/**是否隐藏 */
|
||||
is_hide: boolean;
|
||||
/**是否必填 */
|
||||
is_required: boolean;
|
||||
/**查询方式 */
|
||||
query_way: string;
|
||||
/**展示类型 */
|
||||
show_type: string;
|
||||
/**索引 */
|
||||
index: number;
|
||||
/**创建时间 */
|
||||
create_time: string;
|
||||
/**修改时间 */
|
||||
update_time: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代码生成信息
|
||||
*/
|
||||
export type GenerateCodeInfo = {
|
||||
label: string;
|
||||
value: string;
|
||||
type: string;
|
||||
path: string;
|
||||
};
|
||||
|
||||
/**代码生成结果 */
|
||||
export type GenerateCodeResult = {
|
||||
/**后端代码 */
|
||||
backend: GenerateCodeInfo[];
|
||||
/**前端代码 */
|
||||
frontend: GenerateCodeInfo[];
|
||||
/**SQL代码*/
|
||||
sql: GenerateCodeInfo[];
|
||||
};
|
||||
Reference in New Issue
Block a user