import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; const users = pgTable("users", { id: text("id").primaryKey().default(sql`xata_id()`), did: text("did").unique().notNull(), displayName: text("display_name"), handle: text("handle").unique().notNull(), avatar: text("avatar"), createdAt: timestamp("created_at").defaultNow().notNull(), updatedAt: timestamp("updated_at").defaultNow().notNull(), }); export type SelectUser = InferSelectModel; export type InsertUser = InferInsertModel; export default users;