kioai / lib /db /src /schema /users.ts
kinaiok
Initial deployment setup for Hugging Face Spaces
5ef6e9d
import { pgTable, serial, text, timestamp, boolean, integer } from "drizzle-orm/pg-core";
export const usersTable = pgTable("users", {
id: serial("id").primaryKey(),
email: text("email").notNull().unique(),
passwordHash: text("password_hash").notNull(),
displayName: text("display_name"),
isAdmin: boolean("is_admin").default(false).notNull(),
credits: integer("credits").default(0).notNull(),
createdAt: timestamp("created_at").defaultNow().notNull(),
});
export type User = typeof usersTable.$inferSelect;
export type InsertUser = typeof usersTable.$inferInsert;