forked from OtterMind/Chat2DB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole.ts
More file actions
32 lines (28 loc) · 1.01 KB
/
Copy pathconsole.ts
File metadata and controls
32 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { ConsoleStatus, DatabaseTypeCode, WorkspaceTabType, ConsoleOpenedStatus } from '@/constants';
export interface ICreateConsoleParams {
name?: string;
ddl?: string;
dataSourceId: number;
dataSourceName: string;
databaseType: DatabaseTypeCode;
databaseName?: string;
schemaName?: string;
operationType?: WorkspaceTabType;
loadSQL?: () => Promise<string>;
}
// 控制台详情
export interface IConsole {
id: number; // consoleId
name: string; // 控制台名称
ddl: string; // 控制台内的sql
dataSourceId?: number; // 数据源id
dataSourceName?: string; // 数据源名称
type?: DatabaseTypeCode; // 数据库类型
databaseName?: string; // 数据库名称
schemaName?: string; // schema名称
status: ConsoleStatus; // 控制台状态
connectable: boolean; // 是否可连接
tabOpened?: ConsoleOpenedStatus; // 控制台tab是否打开
operationType: WorkspaceTabType; // 操作类型
}
export type ICreateConsole = Omit<IConsole, 'id' | 'dataSourceName' | 'connectable'>;