87 lines
2.4 KiB
Plaintext
87 lines
2.4 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
username String @unique
|
|
password String
|
|
name String
|
|
role String @default("member") // admin | member
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
activityLogs ActivityLog[]
|
|
}
|
|
|
|
model LaunchTask {
|
|
id String @id @default(cuid())
|
|
title String
|
|
description String?
|
|
phase Int // 1, 2, 3
|
|
status String @default("todo") // todo | in_progress | done
|
|
assignee String?
|
|
sortOrder Int @default(0)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model SubscriptionTier {
|
|
id String @id @default(cuid())
|
|
tierNumber Int @unique
|
|
name String
|
|
price Float
|
|
priceMax Float? // for range pricing like Tier 4
|
|
description String?
|
|
isApplicationOnly Boolean @default(false)
|
|
hardCap Int?
|
|
paymentLink String?
|
|
paymentLinkStatus String @default("not_collected") // collected | not_collected
|
|
subscriberCount Int @default(0)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model ContentSession {
|
|
id String @id @default(cuid())
|
|
title String
|
|
dayOfWeek String // Monday | Wednesday | Friday
|
|
topic String
|
|
description String?
|
|
weekStart DateTime // Monday of that week
|
|
status String @default("planned") // planned | completed | cancelled
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model FunnelMetric {
|
|
id String @id @default(cuid())
|
|
date DateTime @default(now())
|
|
quowavyFollowers Int @default(0)
|
|
kevinthevpFollowers Int @default(0)
|
|
oskvlabsFollowers Int @default(0)
|
|
discordMembersFree Int @default(0)
|
|
discordMembersPaid Int @default(0)
|
|
conversionRate Float @default(0)
|
|
notes String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model ActivityLog {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
action String
|
|
entity String // e.g., "LaunchTask", "SubscriptionTier"
|
|
entityId String?
|
|
details String?
|
|
createdAt DateTime @default(now())
|
|
|
|
user User @relation(fields: [userId], references: [id])
|
|
}
|