fb / lib /db /src /schema /users.ts
sare26's picture
Upload 83 files
312c2e2 verified
Raw
History Blame Contribute Delete
460 Bytes
import { pgTable, text, timestamp, boolean } from "drizzle-orm/pg-core";
export const usersTable = pgTable("users", {
id: text("id").primaryKey(),
email: text("email"),
ipAddress: text("ip_address"),
isBanned: boolean("is_banned").notNull().default(false),
bannedAt: timestamp("banned_at"),
lastSeenAt: timestamp("last_seen_at"),
createdAt: timestamp("created_at").notNull().defaultNow(),
});
export type User = typeof usersTable.$inferSelect;