- Replace boilerplate with complete Design Buddy application - Add AI-powered room design generation using Google Gemini SDK - Implement user authentication with Google OAuth via Better Auth - Create credit system with 30 free credits for new users - Build image upload interface with drag-and-drop functionality - Add room type and design style selection (Living Room, Kitchen, etc.) - Implement AI generation with geographical restriction handling - Add credit refund system for API failures - Create responsive landing page with feature sections - Replace all branding and navigation with Design Buddy theme - Add complete user dashboard with real-time credit balance - Implement download functionality for generated designs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
10 lines
494 B
SQL
10 lines
494 B
SQL
CREATE TABLE "creditUsage" (
|
|
"id" text PRIMARY KEY NOT NULL,
|
|
"userId" text NOT NULL,
|
|
"creditsUsed" integer DEFAULT 1 NOT NULL,
|
|
"description" text NOT NULL,
|
|
"createdAt" timestamp DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "user" ADD COLUMN "credits" integer DEFAULT 30 NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "creditUsage" ADD CONSTRAINT "creditUsage_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action; |