Extracted stack files

This commit is contained in:
keshavanandmusi
2025-12-14 23:48:59 +00:00
parent 6c71fa7f0e
commit 7982b4d5ad
75 changed files with 14410 additions and 0 deletions

18
shared/schema.ts Normal file
View File

@@ -0,0 +1,18 @@
import { sql } from "drizzle-orm";
import { pgTable, text, varchar } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { z } from "zod";
export const users = pgTable("users", {
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
username: text("username").notNull().unique(),
password: text("password").notNull(),
});
export const insertUserSchema = createInsertSchema(users).pick({
username: true,
password: true,
});
export type InsertUser = z.infer<typeof insertUserSchema>;
export type User = typeof users.$inferSelect;