SQL to TypeScript Types

Free

Paste SQL CREATE TABLE statements → TypeScript interfaces, Zod schemas, Prisma models, Drizzle or TypeORM.

SQL Schema

3 tables parsed

Generated TypeScript

export interface Users {
  id: number | number; // Primary Key
  email: string | string; // Unique
  name?: string | null;
  passwordHash: string | string;
  role?: string | null;
  isActive?: boolean | null;
  lastLoginAt?: string | null;
  createdAt?: string | null;
  updatedAt?: string | null;
}

export interface Posts {
  id: string | string; // Primary Key
  userId: number | number;
  title: string | string;
  content?: string | null;
  status?: string | null;
  viewCount?: number | null;
  publishedAt?: string | null;
  createdAt?: string | null;
}

export interface Tags {
  id: number | number; // Primary Key
  name: string | string; // Unique
  slug: string | string; // Unique
  color?: string | null;
}

Parsed Tables

Users

9 columns · 1 PK · 6 nullable

Posts

8 columns · 1 PK · 5 nullable

Tags

4 columns · 1 PK · 1 nullable

Reviews

Sign in to write a review