feat: db init

This commit is contained in:
afiqzudinhadi 2025-06-28 17:21:09 +08:00
parent 0b1cbef59e
commit a6fc74e851
23 changed files with 1536 additions and 5553 deletions

View file

@ -0,0 +1,13 @@
import { pgTable, text } from "drizzle-orm/pg-core";
import { timestamps } from "./column.helpers";
export const user = 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 user.$inferInsert;
export type SelectUser = typeof user.$inferSelect;