Files
FrenoCorp/src/db/schema/waitlist.ts
Michael Freno 67c3881dcf Add waitlist schema for marketing (FRE-635)
- Created waitlist_signups and waitlist_events tables
- Supports email, name, source tracking, and status management
- Enables VIP supporter list for Product Hunt launch
- Migration 0002_chemical_shocker.sql generated
- Fixed brand color in product-hunt-assets-brief.md (#518ac8)
2026-04-26 06:21:20 -04:00

26 lines
1.2 KiB
TypeScript

import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
export const waitlistSignups = sqliteTable("waitlist_signups", {
id: integer("id").primaryKey({ autoIncrement: true }),
email: text("email").notNull().unique(),
name: text("name"),
source: text("source").notNull().default("organic"),
status: text("status").notNull().default("waitlist"),
metadata: text("metadata"),
createdAt: integer("created_at", { mode: "timestamp" }).notNull().default(new Date()),
updatedAt: integer("updated_at", { mode: "timestamp" }).notNull().default(new Date()),
});
export const waitlistEvents = sqliteTable("waitlist_events", {
id: integer("id").primaryKey({ autoIncrement: true }),
signupId: integer("signup_id").notNull().references(() => waitlistSignups.id),
eventType: text("event_type").notNull(),
eventData: text("event_data"),
createdAt: integer("created_at", { mode: "timestamp" }).notNull().default(new Date()),
});
export type WaitlistSignup = typeof waitlistSignups.$inferSelect;
export type NewWaitlistSignup = typeof waitlistSignups.$inferInsert;
export type WaitlistEvent = typeof waitlistEvents.$inferSelect;
export type NewWaitlistEvent = typeof waitlistEvents.$inferInsert;