在线工具集
正在加载,请稍候…
正在加载,请稍候…
粘贴 CREATE TABLE 语句自动生成 interface 或 type 定义,支持枚举联合类型、下划线转驼峰与注释保留。
识别到 1 张表、6 个字段
export interface Users {
/** 主键 */
id: number;
/** 昵称 */
nickname: string;
/** 邮箱 */
email: string | null;
age: number | null;
status: 'active' | 'disabled';
createdAt: string;
}| 表 | 字段 | SQL 类型 | TS 类型 |
|---|---|---|---|
| users | id | BIGINT | number |
| nickname | VARCHAR(50) | string | |
| VARCHAR(120) | string | null | ||
| age | TINYINT | number | null | |
| status | ENUM('active', 'disabled') | 'active' | 'disabled' | |
| created_at | TIMESTAMP | string |
说明