import { id, timestamps } from "../drizzle/types.js";
import { pgTable, varchar, unique } from "drizzle-orm/pg-core";

export const userTable = pgTable(
  "users",
  {
    ...id,
    ...timestamps,
    name: varchar("name", { length: 255 }),
    email: varchar("email", { length: 255 }).notNull(),
    customerID: varchar("customer_id", { length: 255 }).notNull(),
  },
  (user) => [unique("idx_user_email").on(user.email)],
);
