@bash-app/bash-common 30.69.0 → 30.69.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/prisma/schema.prisma +294 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bash-app/bash-common",
|
|
3
|
-
"version": "30.69.
|
|
3
|
+
"version": "30.69.2",
|
|
4
4
|
"description": "Common data and scripts to use on the frontend and backend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"tsx": "^4.10.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"@playwright/test": "^1.54.2",
|
|
41
42
|
"@types/jest": "^29.5.5",
|
|
42
43
|
"@types/luxon": "^3.4.2",
|
|
43
44
|
"@types/mixpanel-browser": "^2.60.0",
|
package/prisma/schema.prisma
CHANGED
|
@@ -396,6 +396,12 @@ model BashEvent {
|
|
|
396
396
|
|
|
397
397
|
// Vendor booking relations
|
|
398
398
|
vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingEvent")
|
|
399
|
+
|
|
400
|
+
// Exhibitor booking relations
|
|
401
|
+
exhibitorBookingRequests ExhibitorBookingRequest[] @relation("ExhibitorBookingEvent")
|
|
402
|
+
|
|
403
|
+
// Sponsor booking relations
|
|
404
|
+
sponsorBookingRequests SponsorBookingRequest[] @relation("SponsorBookingEvent")
|
|
399
405
|
}
|
|
400
406
|
|
|
401
407
|
model Coordinates {
|
|
@@ -1056,6 +1062,18 @@ model SponsoredEvent {
|
|
|
1056
1062
|
sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
|
|
1057
1063
|
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
1058
1064
|
media Media[]
|
|
1065
|
+
|
|
1066
|
+
// Enhanced sponsor display fields
|
|
1067
|
+
displayName String? // Custom display name for sponsor
|
|
1068
|
+
logoUrl String? // Direct logo URL
|
|
1069
|
+
websiteUrl String? // Sponsor website
|
|
1070
|
+
description String? // Sponsor description
|
|
1071
|
+
displayOrder Int? // Order for displaying multiple sponsors
|
|
1072
|
+
isActive Boolean @default(true) // Whether to show this sponsorship
|
|
1073
|
+
tier SponsorTier @default(Bronze) // Sponsorship tier for display priority
|
|
1074
|
+
|
|
1075
|
+
createdAt DateTime @default(now())
|
|
1076
|
+
updatedAt DateTime @updatedAt
|
|
1059
1077
|
}
|
|
1060
1078
|
|
|
1061
1079
|
enum SponsorType {
|
|
@@ -1066,6 +1084,14 @@ enum SponsorType {
|
|
|
1066
1084
|
CompetitionPrizeProvider
|
|
1067
1085
|
}
|
|
1068
1086
|
|
|
1087
|
+
enum SponsorTier {
|
|
1088
|
+
Platinum
|
|
1089
|
+
Gold
|
|
1090
|
+
Silver
|
|
1091
|
+
Bronze
|
|
1092
|
+
Community
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1069
1095
|
model SocialMediaProfile {
|
|
1070
1096
|
id String @id @default(uuid())
|
|
1071
1097
|
platform SocialMediaPlatform
|
|
@@ -1153,29 +1179,38 @@ model User {
|
|
|
1153
1179
|
totalRatings Int?
|
|
1154
1180
|
magicLink String?
|
|
1155
1181
|
magicLinkExpiration DateTime?
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1182
|
+
|
|
1183
|
+
// Founding Host tracking
|
|
1184
|
+
hostNumber Int? // Sequential number for host registration (1-100 for founding hosts)
|
|
1185
|
+
foundingHostBadgeAwarded Boolean @default(false) // Whether they've received the founding host badge
|
|
1186
|
+
firstBashWithAttendeesDate DateTime? // Date when they first completed a bash with attendees
|
|
1187
|
+
bashesCreatedCount Int @default(0) // Total bashes created
|
|
1188
|
+
bashesPublishedCount Int @default(0) // Total bashes published
|
|
1189
|
+
bashesApprovedCount Int @default(0) // Total bashes approved
|
|
1190
|
+
bashesCompletedCount Int @default(0) // Total bashes completed with attendees
|
|
1191
|
+
magicLinkUsed DateTime?
|
|
1192
|
+
idVerified DateTime?
|
|
1193
|
+
street String?
|
|
1194
|
+
city String?
|
|
1195
|
+
state String?
|
|
1196
|
+
zipCode String?
|
|
1197
|
+
country String? @default("US")
|
|
1198
|
+
phone String?
|
|
1199
|
+
socialMediaProfiles SocialMediaProfile[]
|
|
1200
|
+
documentIDId String? @unique
|
|
1201
|
+
documentID DocumentID?
|
|
1202
|
+
comment BashComment[]
|
|
1203
|
+
associatedBashes AssociatedBash[]
|
|
1204
|
+
associatedServices AssociatedService[]
|
|
1205
|
+
invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
|
|
1206
|
+
invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
|
|
1207
|
+
notificationsCreatedByMe Notification[] @relation("NotificationsCreatedByMe")
|
|
1208
|
+
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
1209
|
+
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
1210
|
+
eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
|
|
1211
|
+
contacts Contact[]
|
|
1212
|
+
contactLists ContactList[] @relation("UserContactLists")
|
|
1213
|
+
contactlist ContactList[]
|
|
1179
1214
|
|
|
1180
1215
|
bashEventPromoCodesIUsed BashEventPromoCode[]
|
|
1181
1216
|
userSubscription UserSubscription?
|
|
@@ -1264,11 +1299,27 @@ model User {
|
|
|
1264
1299
|
// Vendor booking relations
|
|
1265
1300
|
vendorBookingRequestsAsHost VendorBookingRequest[] @relation("VendorBookingHost")
|
|
1266
1301
|
|
|
1302
|
+
// Exhibitor booking relations
|
|
1303
|
+
exhibitorBookingRequestsAsHost ExhibitorBookingRequest[] @relation("ExhibitorBookingHost")
|
|
1304
|
+
|
|
1305
|
+
// Sponsor booking relations
|
|
1306
|
+
sponsorBookingRequestsAsHost SponsorBookingRequest[] @relation("SponsorBookingHost")
|
|
1307
|
+
|
|
1267
1308
|
// Vendor booking messages
|
|
1268
1309
|
vendorBookingMessages VendorBookingMessage[] @relation("VendorMessageSender")
|
|
1269
|
-
|
|
1310
|
+
|
|
1270
1311
|
// Unified service booking messages
|
|
1271
1312
|
serviceBookingMessages ServiceBookingMessage[] @relation("ServiceMessageSender")
|
|
1313
|
+
|
|
1314
|
+
// Identity Verification (Additional Security Layer)
|
|
1315
|
+
isVerified Boolean @default(false) // Has completed identity verification
|
|
1316
|
+
verificationMethod String? // "biometric", "document", "manual", etc.
|
|
1317
|
+
verifiedAt DateTime? // When verification was completed
|
|
1318
|
+
verificationScore Int @default(0) // Trust score (0-100)
|
|
1319
|
+
biometricFingerprint String? // Unique biometric hash for anti-fraud
|
|
1320
|
+
|
|
1321
|
+
// Biometric authentication
|
|
1322
|
+
biometricCredentials BiometricCredential[]
|
|
1272
1323
|
}
|
|
1273
1324
|
|
|
1274
1325
|
model UserPreferences {
|
|
@@ -1312,6 +1363,11 @@ model UserPreferences {
|
|
|
1312
1363
|
trackFirstEventAttended Boolean @default(true) // NEW - remember which bash connected you
|
|
1313
1364
|
autoAddServiceClients Boolean @default(true) // NEW - auto-add service clients to contacts
|
|
1314
1365
|
|
|
1366
|
+
// Contact Information Privacy (NEW SECTION)
|
|
1367
|
+
showEmailPublicly Boolean @default(true) // Email visibility in contact lists (default public since already exposed)
|
|
1368
|
+
showPhonePublicly Boolean @default(false) // Phone visibility in contact lists (default private, opt-in)
|
|
1369
|
+
showAddressPublicly Boolean @default(false) // Address visibility in contact lists (default private)
|
|
1370
|
+
|
|
1315
1371
|
// UI/UX Preferences
|
|
1316
1372
|
theme String @default("system") // Updated to lowercase, matches our UI
|
|
1317
1373
|
language String @default("en") // Simplified from en-US
|
|
@@ -1380,6 +1436,31 @@ model UserFollowing {
|
|
|
1380
1436
|
@@unique([userId, followingId])
|
|
1381
1437
|
}
|
|
1382
1438
|
|
|
1439
|
+
model BiometricCredential {
|
|
1440
|
+
id String @id @default(cuid())
|
|
1441
|
+
userId String
|
|
1442
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1443
|
+
credentialId String @unique // WebAuthn credential ID (base64 encoded)
|
|
1444
|
+
publicKey String // WebAuthn public key (base64 encoded)
|
|
1445
|
+
counter Int @default(0) // WebAuthn signature counter
|
|
1446
|
+
deviceType String? // e.g., "Touch ID", "Face ID", "Windows Hello"
|
|
1447
|
+
deviceInfo Json? // Additional device information
|
|
1448
|
+
isActive Boolean @default(true)
|
|
1449
|
+
lastUsedAt DateTime?
|
|
1450
|
+
createdAt DateTime @default(now())
|
|
1451
|
+
updatedAt DateTime @updatedAt
|
|
1452
|
+
|
|
1453
|
+
// Verification system fields
|
|
1454
|
+
usedForVerification Boolean @default(false) // Was this credential used to verify identity?
|
|
1455
|
+
verificationLevel String? // "basic", "enhanced", "premium"
|
|
1456
|
+
biometricHash String? // Unique hash for anti-fraud detection
|
|
1457
|
+
|
|
1458
|
+
@@index([userId])
|
|
1459
|
+
@@index([credentialId])
|
|
1460
|
+
@@index([isActive])
|
|
1461
|
+
@@index([usedForVerification])
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1383
1464
|
model Contact {
|
|
1384
1465
|
id String @id @default(cuid())
|
|
1385
1466
|
contactOwnerId String
|
|
@@ -1642,12 +1723,14 @@ model Service {
|
|
|
1642
1723
|
|
|
1643
1724
|
// googleReviews GoogleReview[]
|
|
1644
1725
|
|
|
1645
|
-
bashEvent
|
|
1646
|
-
userPromoCodeRedemption
|
|
1647
|
-
bookings
|
|
1648
|
-
notification
|
|
1649
|
-
favoritedBy
|
|
1650
|
-
vendorBookingRequests
|
|
1726
|
+
bashEvent BashEvent[] // because a service needs to be associated with a bash to post to the bashfeed
|
|
1727
|
+
userPromoCodeRedemption UserPromoCodeRedemption[]
|
|
1728
|
+
bookings ServiceBooking[]
|
|
1729
|
+
notification Notification[]
|
|
1730
|
+
favoritedBy UserFavorite[]
|
|
1731
|
+
vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingService")
|
|
1732
|
+
exhibitorBookingRequests ExhibitorBookingRequest[] @relation("ExhibitorBookingService")
|
|
1733
|
+
sponsorBookingRequests SponsorBookingRequest[] @relation("SponsorBookingService")
|
|
1651
1734
|
}
|
|
1652
1735
|
|
|
1653
1736
|
model StripeAccount {
|
|
@@ -3471,7 +3554,7 @@ model ServiceBooking {
|
|
|
3471
3554
|
|
|
3472
3555
|
addOns ServiceBookingAddOn[] // for services that aren't billed by time, but have add-ons
|
|
3473
3556
|
packages ServiceBookingPackage[] // for services that aren't billed by time, but have packages
|
|
3474
|
-
|
|
3557
|
+
|
|
3475
3558
|
// Messages relation
|
|
3476
3559
|
messages ServiceBookingMessage[]
|
|
3477
3560
|
|
|
@@ -3553,7 +3636,7 @@ model VendorBookingRequest {
|
|
|
3553
3636
|
|
|
3554
3637
|
// Messages relation
|
|
3555
3638
|
messages VendorBookingMessage[]
|
|
3556
|
-
|
|
3639
|
+
|
|
3557
3640
|
// Unified messages relation
|
|
3558
3641
|
serviceMessages ServiceBookingMessage[] @relation("ServiceBookingMessages")
|
|
3559
3642
|
|
|
@@ -3598,29 +3681,37 @@ model ServiceBookingMessage {
|
|
|
3598
3681
|
createdAt DateTime @default(now())
|
|
3599
3682
|
updatedAt DateTime @updatedAt
|
|
3600
3683
|
|
|
3601
|
-
// Relations - can be linked to
|
|
3602
|
-
serviceBookingId
|
|
3603
|
-
serviceBooking
|
|
3604
|
-
|
|
3684
|
+
// Relations - can be linked to ServiceBooking, VendorBookingRequest, ExhibitorBookingRequest, or SponsorBookingRequest
|
|
3685
|
+
serviceBookingId String?
|
|
3686
|
+
serviceBooking ServiceBooking? @relation(fields: [serviceBookingId], references: [id], onDelete: Cascade)
|
|
3687
|
+
|
|
3605
3688
|
vendorBookingRequestId String?
|
|
3606
3689
|
vendorBookingRequest VendorBookingRequest? @relation("ServiceBookingMessages", fields: [vendorBookingRequestId], references: [id], onDelete: Cascade)
|
|
3607
|
-
|
|
3690
|
+
|
|
3691
|
+
exhibitorBookingRequestId String?
|
|
3692
|
+
exhibitorBookingRequest ExhibitorBookingRequest? @relation("ExhibitorServiceMessages", fields: [exhibitorBookingRequestId], references: [id], onDelete: Cascade)
|
|
3693
|
+
|
|
3694
|
+
sponsorBookingRequestId String?
|
|
3695
|
+
sponsorBookingRequest SponsorBookingRequest? @relation("SponsorServiceMessages", fields: [sponsorBookingRequestId], references: [id], onDelete: Cascade)
|
|
3696
|
+
|
|
3608
3697
|
senderId String
|
|
3609
3698
|
sender User @relation("ServiceMessageSender", fields: [senderId], references: [id], onDelete: Cascade)
|
|
3610
|
-
|
|
3699
|
+
|
|
3611
3700
|
// Message content
|
|
3612
3701
|
message String @db.Text
|
|
3613
3702
|
messageType String @default("text") // "text", "system", "booking_update", "payment_update", etc.
|
|
3614
|
-
|
|
3703
|
+
|
|
3615
3704
|
// Read status
|
|
3616
|
-
isRead
|
|
3617
|
-
readAt
|
|
3618
|
-
|
|
3705
|
+
isRead Boolean @default(false)
|
|
3706
|
+
readAt DateTime?
|
|
3707
|
+
|
|
3619
3708
|
// Metadata for different message types
|
|
3620
3709
|
metadata Json? // For storing additional message data like booking changes, payment info, etc.
|
|
3621
3710
|
|
|
3622
3711
|
@@index([serviceBookingId])
|
|
3623
3712
|
@@index([vendorBookingRequestId])
|
|
3713
|
+
@@index([exhibitorBookingRequestId])
|
|
3714
|
+
@@index([sponsorBookingRequestId])
|
|
3624
3715
|
@@index([senderId])
|
|
3625
3716
|
@@index([createdAt])
|
|
3626
3717
|
}
|
|
@@ -3635,6 +3726,167 @@ enum VendorBookingStatus {
|
|
|
3635
3726
|
EXPIRED // Request expired without response
|
|
3636
3727
|
}
|
|
3637
3728
|
|
|
3729
|
+
model ExhibitorBookingRequest {
|
|
3730
|
+
id String @id @default(cuid())
|
|
3731
|
+
createdAt DateTime @default(now())
|
|
3732
|
+
updatedAt DateTime @updatedAt
|
|
3733
|
+
|
|
3734
|
+
// Relations
|
|
3735
|
+
hostUserId String
|
|
3736
|
+
hostUser User @relation("ExhibitorBookingHost", fields: [hostUserId], references: [id], onDelete: Cascade)
|
|
3737
|
+
exhibitorServiceId String
|
|
3738
|
+
exhibitorService Service @relation("ExhibitorBookingService", fields: [exhibitorServiceId], references: [id], onDelete: Cascade)
|
|
3739
|
+
bashEventId String?
|
|
3740
|
+
bashEvent BashEvent? @relation("ExhibitorBookingEvent", fields: [bashEventId], references: [id], onDelete: SetNull)
|
|
3741
|
+
|
|
3742
|
+
// Request data (structured fields)
|
|
3743
|
+
spaceOffered String
|
|
3744
|
+
customSpaceOffered String?
|
|
3745
|
+
providingTent Boolean @default(false)
|
|
3746
|
+
providingTables Int @default(0)
|
|
3747
|
+
providingChairs Boolean @default(false)
|
|
3748
|
+
providingElectricity Boolean @default(false)
|
|
3749
|
+
providingWater Boolean @default(false)
|
|
3750
|
+
providingInternet Boolean @default(false)
|
|
3751
|
+
|
|
3752
|
+
expectedGuests Int
|
|
3753
|
+
eventDuration String
|
|
3754
|
+
setupTime String
|
|
3755
|
+
breakdownTime String
|
|
3756
|
+
|
|
3757
|
+
exhibitorFee Float?
|
|
3758
|
+
feeStructure String // "flat", "percentage", "free", "negotiable"
|
|
3759
|
+
percentageRate Float?
|
|
3760
|
+
|
|
3761
|
+
eventDescription String @db.Text
|
|
3762
|
+
specialRequests String @db.Text
|
|
3763
|
+
contactPreference String @default("email") // "email", "phone", "either"
|
|
3764
|
+
urgency String @default("flexible") // "asap", "within_week", "flexible"
|
|
3765
|
+
|
|
3766
|
+
paymentTiming String @default("advance") // "advance", "day_of", "after_event", "deposit_balance"
|
|
3767
|
+
depositPercentage Float?
|
|
3768
|
+
|
|
3769
|
+
budgetRange String
|
|
3770
|
+
competitorRestrictions String @db.Text
|
|
3771
|
+
insuranceRequired Boolean @default(false)
|
|
3772
|
+
permitRequirements String @db.Text
|
|
3773
|
+
weatherContingency String @db.Text
|
|
3774
|
+
cancellationPolicy String @db.Text
|
|
3775
|
+
|
|
3776
|
+
// Exhibitor-specific fields
|
|
3777
|
+
leadGenerationExpected Boolean @default(false)
|
|
3778
|
+
materialDistribution String @db.Text
|
|
3779
|
+
demonstrationNeeds String @db.Text
|
|
3780
|
+
|
|
3781
|
+
// Status and workflow
|
|
3782
|
+
status ExhibitorBookingStatus @default(PENDING)
|
|
3783
|
+
|
|
3784
|
+
// Payment information (populated when exhibitor accepts)
|
|
3785
|
+
paymentAmount Float?
|
|
3786
|
+
paymentStatus String?
|
|
3787
|
+
stripePaymentIntentId String?
|
|
3788
|
+
paidAt DateTime?
|
|
3789
|
+
|
|
3790
|
+
// Response from exhibitor
|
|
3791
|
+
responseMessage String? // Exhibitor's message when accepting/rejecting
|
|
3792
|
+
respondedAt DateTime?
|
|
3793
|
+
|
|
3794
|
+
// Unified messages relation
|
|
3795
|
+
serviceMessages ServiceBookingMessage[] @relation("ExhibitorServiceMessages")
|
|
3796
|
+
|
|
3797
|
+
@@index([hostUserId])
|
|
3798
|
+
@@index([exhibitorServiceId])
|
|
3799
|
+
@@index([status])
|
|
3800
|
+
@@index([createdAt])
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
enum ExhibitorBookingStatus {
|
|
3804
|
+
PENDING // Initial request sent
|
|
3805
|
+
ACCEPTED // Exhibitor accepted, awaiting payment
|
|
3806
|
+
PAID // Exhibitor has paid host
|
|
3807
|
+
COMPLETED // Event completed successfully
|
|
3808
|
+
REJECTED // Exhibitor rejected request
|
|
3809
|
+
CANCELLED // Host or exhibitor cancelled
|
|
3810
|
+
EXPIRED // Request expired without response
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3813
|
+
model SponsorBookingRequest {
|
|
3814
|
+
id String @id @default(cuid())
|
|
3815
|
+
createdAt DateTime @default(now())
|
|
3816
|
+
updatedAt DateTime @updatedAt
|
|
3817
|
+
|
|
3818
|
+
// Relations
|
|
3819
|
+
hostUserId String
|
|
3820
|
+
hostUser User @relation("SponsorBookingHost", fields: [hostUserId], references: [id], onDelete: Cascade)
|
|
3821
|
+
sponsorServiceId String
|
|
3822
|
+
sponsorService Service @relation("SponsorBookingService", fields: [sponsorServiceId], references: [id], onDelete: Cascade)
|
|
3823
|
+
bashEventId String?
|
|
3824
|
+
bashEvent BashEvent? @relation("SponsorBookingEvent", fields: [bashEventId], references: [id], onDelete: SetNull)
|
|
3825
|
+
|
|
3826
|
+
// Sponsorship details
|
|
3827
|
+
sponsorshipLevel String
|
|
3828
|
+
customSponsorshipLevel String?
|
|
3829
|
+
sponsorshipBudget String
|
|
3830
|
+
customBudget Float?
|
|
3831
|
+
sponsorFee Float @default(0)
|
|
3832
|
+
feeStructure String @default("flat") // "flat", "percentage", "free", "negotiable"
|
|
3833
|
+
percentageRate Float?
|
|
3834
|
+
paymentTiming String @default("advance") // "advance", "day_of", "after_event", "deposit_balance"
|
|
3835
|
+
depositPercentage Float?
|
|
3836
|
+
|
|
3837
|
+
// Benefits offered (stored as JSON for complex data)
|
|
3838
|
+
benefitsOffered String @db.Text // JSON string containing benefit categories and custom benefits
|
|
3839
|
+
|
|
3840
|
+
// Deliverables required (stored as JSON for complex data)
|
|
3841
|
+
deliverablesRequired String @db.Text // JSON string containing required deliverables
|
|
3842
|
+
|
|
3843
|
+
expectedGuests Int
|
|
3844
|
+
eventDuration String
|
|
3845
|
+
eventDescription String @db.Text
|
|
3846
|
+
specialRequests String @db.Text
|
|
3847
|
+
contactPreference String @default("email") // "email", "phone", "either"
|
|
3848
|
+
urgency String @default("flexible") // "asap", "within_week", "flexible"
|
|
3849
|
+
|
|
3850
|
+
competitorRestrictions String @db.Text
|
|
3851
|
+
exclusivityRequirements String @db.Text
|
|
3852
|
+
roiExpectations String @db.Text
|
|
3853
|
+
reportingRequirements String @db.Text
|
|
3854
|
+
cancellationPolicy String @db.Text
|
|
3855
|
+
mentionRequirements String @db.Text
|
|
3856
|
+
socialMediaRequirements String @db.Text
|
|
3857
|
+
|
|
3858
|
+
// Status and workflow
|
|
3859
|
+
status SponsorBookingStatus @default(PENDING)
|
|
3860
|
+
|
|
3861
|
+
// Payment information (populated when sponsor accepts)
|
|
3862
|
+
paymentAmount Float?
|
|
3863
|
+
paymentStatus String?
|
|
3864
|
+
stripePaymentIntentId String?
|
|
3865
|
+
paidAt DateTime?
|
|
3866
|
+
|
|
3867
|
+
// Response from sponsor
|
|
3868
|
+
responseMessage String? // Sponsor's message when accepting/rejecting
|
|
3869
|
+
respondedAt DateTime?
|
|
3870
|
+
|
|
3871
|
+
// Unified messages relation
|
|
3872
|
+
serviceMessages ServiceBookingMessage[] @relation("SponsorServiceMessages")
|
|
3873
|
+
|
|
3874
|
+
@@index([hostUserId])
|
|
3875
|
+
@@index([sponsorServiceId])
|
|
3876
|
+
@@index([status])
|
|
3877
|
+
@@index([createdAt])
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
enum SponsorBookingStatus {
|
|
3881
|
+
PENDING // Initial request sent
|
|
3882
|
+
ACCEPTED // Sponsor accepted, awaiting payment
|
|
3883
|
+
PAID // Sponsor has paid host
|
|
3884
|
+
COMPLETED // Event completed successfully
|
|
3885
|
+
REJECTED // Sponsor rejected request
|
|
3886
|
+
CANCELLED // Host or sponsor cancelled
|
|
3887
|
+
EXPIRED // Request expired without response
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3638
3890
|
enum VisibilityPreference {
|
|
3639
3891
|
Public
|
|
3640
3892
|
Private
|