export const user = pgTable(
"user",
{
id: text("id").primaryKey(),
name: text("name").notNull(),
email: text("email").notNull().unique(),
phone: text("phone").unique(),
emailVerified: boolean("email_verified").notNull(),
image: text("image"),
createdAt: timestamp("created_at").notNull(),
updatedAt: timestamp("updated_at").notNull(),
onboardingCompleted: boolean("onboarding_completed")
.notNull()
.default(false),
},
(table) => [index("user_email_idx").on(table.email)]
);
export const user = pgTable(
"user",
{
id: text("id").primaryKey(),
name: text("name").notNull(),
email: text("email").notNull().unique(),
phone: text("phone").unique(),
emailVerified: boolean("email_verified").notNull(),
image: text("image"),
createdAt: timestamp("created_at").notNull(),
updatedAt: timestamp("updated_at").notNull(),
onboardingCompleted: boolean("onboarding_completed")
.notNull()
.default(false),
},
(table) => [index("user_email_idx").on(table.email)]
);