revops + onboarding
This commit is contained in:
@@ -11,11 +11,11 @@ datasource db {
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
email String @unique
|
||||
name String?
|
||||
password String?
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
email String @unique
|
||||
name String?
|
||||
password String?
|
||||
image String?
|
||||
emailVerified DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
@@ -32,16 +32,56 @@ model User {
|
||||
resetPasswordToken String? @unique
|
||||
resetPasswordExpires DateTime?
|
||||
|
||||
// Retention email tracking
|
||||
activationNudgeSentAt DateTime?
|
||||
upgradeNudgeSentAt DateTime?
|
||||
thirtyDayNudgeSentAt DateTime?
|
||||
|
||||
qrCodes QRCode[]
|
||||
integrations Integration[]
|
||||
accounts Account[]
|
||||
sessions Session[]
|
||||
}
|
||||
// Retention email tracking
|
||||
activationNudgeSentAt DateTime?
|
||||
upgradeNudgeSentAt DateTime?
|
||||
thirtyDayNudgeSentAt DateTime?
|
||||
|
||||
// RevOps attribution
|
||||
signupSource String?
|
||||
signupSourceSelfReported String?
|
||||
signupMedium String?
|
||||
signupCampaign String?
|
||||
signupContent String?
|
||||
signupTerm String?
|
||||
signupReferrer String?
|
||||
signupLandingPath String?
|
||||
signupFirstSeenAt DateTime?
|
||||
emailDomain String?
|
||||
|
||||
// Onboarding and qualification
|
||||
primaryUseCase String?
|
||||
primaryGoal String?
|
||||
jobRole String?
|
||||
companyName String?
|
||||
companyWebsite String?
|
||||
teamSizeBucket String?
|
||||
onboardingStartedAt DateTime?
|
||||
sourceConfirmedAt DateTime?
|
||||
useCaseSelectedAt DateTime?
|
||||
goalSelectedAt DateTime?
|
||||
profileCompletedAt DateTime?
|
||||
firstQrCreatedAt DateTime?
|
||||
firstDynamicQrAt DateTime?
|
||||
firstStaticQrAt DateTime?
|
||||
firstScanAt DateTime?
|
||||
activationAt DateTime?
|
||||
onboardingCompletedAt DateTime?
|
||||
|
||||
// RevOps scoring
|
||||
fitScore Int @default(0)
|
||||
intentScore Int @default(0)
|
||||
leadScore Int @default(0)
|
||||
lifecycleStage String @default("cold")
|
||||
lastQualifiedAt DateTime?
|
||||
lastScoredAt DateTime?
|
||||
|
||||
qrCodes QRCode[]
|
||||
integrations Integration[]
|
||||
accounts Account[]
|
||||
sessions Session[]
|
||||
lifecycleLogs UserLifecycleLog[]
|
||||
}
|
||||
|
||||
enum Plan {
|
||||
FREE
|
||||
@@ -149,7 +189,7 @@ model QRScan {
|
||||
@@index([qrId, ts])
|
||||
}
|
||||
|
||||
model Integration {
|
||||
model Integration {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
provider String
|
||||
@@ -158,8 +198,22 @@ model Integration {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model UserLifecycleLog {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
fromStage String?
|
||||
toStage String
|
||||
fitScore Int @default(0)
|
||||
intentScore Int @default(0)
|
||||
leadScore Int @default(0)
|
||||
reason String?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model NewsletterSubscription {
|
||||
id String @id @default(cuid())
|
||||
|
||||
Reference in New Issue
Block a user