ecommerce-template/packages/db/src/schema/users.ts
afiqzudinhadi 7d4b49a0e5 chore: fix module import | add extension
requires extension because no bundler in this package
2025-07-10 22:59:00 +08:00

13 lines
417 B
TypeScript

import { pgTable, text } from "drizzle-orm/pg-core";
import { timestamps } from "./column.helpers.ts";
export const users = pgTable("users", {
id: text("id").primaryKey(), // Clerk user ID
email: text("email").notNull(),
name: text("name"),
role: text("role").default("user").notNull(),
...timestamps,
});
export type InsertUser = typeof users.$inferInsert;
export type SelectUser = typeof users.$inferSelect;