export const userTable = pgTable(
"user",
{
tenantId: text("tenant_id").notNull(), // Add this line
id: text("id").primaryKey(),
name: text("name").notNull(),
email: text("email").notNull(),
emailVerified: boolean("email_verified").notNull().default(false),
image: text("image"),
createdAt: timestamp("created_at").notNull().defaultNow(),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
verifiedAt: timestamp("verified_at"),
},
(t) => [
{
unq: unique().on(t.tenantId, t.email),
},
]
);
export const userTable = pgTable(
"user",
{
tenantId: text("tenant_id").notNull(), // Add this line
id: text("id").primaryKey(),
name: text("name").notNull(),
email: text("email").notNull(),
emailVerified: boolean("email_verified").notNull().default(false),
image: text("image"),
createdAt: timestamp("created_at").notNull().defaultNow(),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
verifiedAt: timestamp("verified_at"),
},
(t) => [
{
unq: unique().on(t.tenantId, t.email),
},
]
);