feat: Implement pricing page, AI generation/transformation APIs, user/project management, and database schema.
This commit is contained in:
@@ -7,16 +7,38 @@ generator client {
|
||||
}
|
||||
|
||||
// =====================
|
||||
// AUTH
|
||||
// AUTH & SUBSCRIPTIONS
|
||||
// =====================
|
||||
model Plan {
|
||||
id String @id // e.g., 'free', 'pro', 'master'
|
||||
name String @unique
|
||||
displayName String
|
||||
price Float
|
||||
description String
|
||||
maxProjects Int // -1 for unlimited
|
||||
maxAiActions Int // -1 for unlimited
|
||||
features String[]
|
||||
isPopular Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
users User[]
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
name String?
|
||||
email String @unique
|
||||
hashedPassword String
|
||||
avatar String?
|
||||
bio String?
|
||||
plan String @default("free") // free | pro | master
|
||||
|
||||
// Legacy string plan (temporarily kept to avoid DB drop errors)
|
||||
plan String @default("free")
|
||||
|
||||
// New Subscription
|
||||
planId String? @default("free")
|
||||
subscriptionPlan Plan? @relation(fields: [planId], references: [id])
|
||||
|
||||
aiActionsUsed Int @default(0)
|
||||
dailyWordGoal Int @default(500)
|
||||
writingStreak Int @default(0)
|
||||
|
||||
Reference in New Issue
Block a user