@bash-app/bash-common 30.111.0 → 30.113.0
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 +1 -1
- package/prisma/schema.prisma +123 -37
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -71,6 +71,8 @@ model BashFeedPost {
|
|
|
71
71
|
comments BashFeedComment[]
|
|
72
72
|
ratings BashFeedRating[]
|
|
73
73
|
reports BashFeedReport[]
|
|
74
|
+
saves BashFeedSave[]
|
|
75
|
+
reposts BashFeedRepost[]
|
|
74
76
|
|
|
75
77
|
@@index([bashId])
|
|
76
78
|
@@index([userId])
|
|
@@ -161,6 +163,36 @@ model BashFeedReport {
|
|
|
161
163
|
@@index([userId])
|
|
162
164
|
}
|
|
163
165
|
|
|
166
|
+
model BashFeedSave {
|
|
167
|
+
id String @id @default(cuid())
|
|
168
|
+
userId String
|
|
169
|
+
postId String
|
|
170
|
+
createdAt DateTime @default(now())
|
|
171
|
+
|
|
172
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
173
|
+
post BashFeedPost @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
174
|
+
|
|
175
|
+
@@unique([userId, postId])
|
|
176
|
+
@@index([postId])
|
|
177
|
+
@@index([userId])
|
|
178
|
+
@@index([createdAt])
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
model BashFeedRepost {
|
|
182
|
+
id String @id @default(cuid())
|
|
183
|
+
userId String
|
|
184
|
+
postId String
|
|
185
|
+
createdAt DateTime @default(now())
|
|
186
|
+
|
|
187
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
188
|
+
post BashFeedPost @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
189
|
+
|
|
190
|
+
@@unique([userId, postId])
|
|
191
|
+
@@index([postId])
|
|
192
|
+
@@index([userId])
|
|
193
|
+
@@index([createdAt])
|
|
194
|
+
}
|
|
195
|
+
|
|
164
196
|
model Competition {
|
|
165
197
|
id String @id @default(cuid())
|
|
166
198
|
name String
|
|
@@ -299,6 +331,28 @@ model Reminder {
|
|
|
299
331
|
remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
|
|
300
332
|
}
|
|
301
333
|
|
|
334
|
+
model SentReminder {
|
|
335
|
+
id String @id @default(cuid())
|
|
336
|
+
userId String
|
|
337
|
+
bashEventId String?
|
|
338
|
+
serviceBookingId String?
|
|
339
|
+
invitationId String?
|
|
340
|
+
reminderType String // 'HOST_IMPROVEMENT_7D', 'HOST_IMPROVEMENT_3D', 'BOOKING_7D', 'BOOKING_24H', 'BOOKING_3H', 'RSVP_3D', 'RSVP_1D', 'PENDING_BOOKING_2D', 'PENDING_BOOKING_5D'
|
|
341
|
+
sentAt DateTime @default(now())
|
|
342
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
343
|
+
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
344
|
+
serviceBooking ServiceBooking? @relation(fields: [serviceBookingId], references: [id], onDelete: Cascade)
|
|
345
|
+
invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
|
|
346
|
+
|
|
347
|
+
@@unique([userId, bashEventId, serviceBookingId, invitationId, reminderType])
|
|
348
|
+
@@index([userId])
|
|
349
|
+
@@index([bashEventId])
|
|
350
|
+
@@index([serviceBookingId])
|
|
351
|
+
@@index([invitationId])
|
|
352
|
+
@@index([reminderType])
|
|
353
|
+
@@index([sentAt])
|
|
354
|
+
}
|
|
355
|
+
|
|
302
356
|
model BashEventPromoCode {
|
|
303
357
|
id String @id @default(cuid())
|
|
304
358
|
code String
|
|
@@ -430,36 +484,38 @@ model Invitation {
|
|
|
430
484
|
sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
|
|
431
485
|
notifications Notification[]
|
|
432
486
|
tickets Ticket[] @relation("TicketsForInvitation")
|
|
487
|
+
sentReminders SentReminder[]
|
|
433
488
|
|
|
434
489
|
@@index([email])
|
|
435
490
|
}
|
|
436
491
|
|
|
437
492
|
model BashEvent {
|
|
438
|
-
id String
|
|
439
|
-
source BashEventSource
|
|
493
|
+
id String @id @default(cuid())
|
|
494
|
+
source BashEventSource @default(Bash)
|
|
440
495
|
title String
|
|
441
|
-
slug String?
|
|
496
|
+
slug String? @unique
|
|
442
497
|
creatorId String
|
|
443
|
-
createdAt DateTime?
|
|
444
|
-
isApproved Boolean?
|
|
498
|
+
createdAt DateTime? @default(now())
|
|
499
|
+
isApproved Boolean? @default(false)
|
|
445
500
|
description String?
|
|
446
|
-
eventType String
|
|
501
|
+
eventType String @default("Other")
|
|
447
502
|
timezone String?
|
|
448
503
|
startDateTime DateTime?
|
|
449
504
|
endDateTime DateTime?
|
|
450
505
|
waiverUrl String?
|
|
451
|
-
waiverRequired Boolean
|
|
452
|
-
waiverDisplayType String?
|
|
453
|
-
targetAudienceId String?
|
|
454
|
-
amountOfGuestsId String?
|
|
506
|
+
waiverRequired Boolean @default(false)
|
|
507
|
+
waiverDisplayType String? @default("inline")
|
|
508
|
+
targetAudienceId String? @unique
|
|
509
|
+
amountOfGuestsId String? @unique
|
|
455
510
|
vibe String?
|
|
456
511
|
occasion String?
|
|
457
512
|
dress String?
|
|
458
513
|
allowed String?
|
|
459
514
|
notAllowed String?
|
|
515
|
+
eventFormat EventFormat? // Derived from location and videoLink: In-Person, Virtual, or Hybrid
|
|
460
516
|
nonProfit Boolean?
|
|
461
517
|
nonProfitId String?
|
|
462
|
-
privacy Privacy
|
|
518
|
+
privacy Privacy @default(Public)
|
|
463
519
|
capacity Int?
|
|
464
520
|
location String?
|
|
465
521
|
street String?
|
|
@@ -467,7 +523,7 @@ model BashEvent {
|
|
|
467
523
|
state String?
|
|
468
524
|
zipCode String?
|
|
469
525
|
country String?
|
|
470
|
-
status BashStatus
|
|
526
|
+
status BashStatus @default(Draft)
|
|
471
527
|
tags String[]
|
|
472
528
|
coverPhoto String?
|
|
473
529
|
clubId String?
|
|
@@ -478,24 +534,24 @@ model BashEvent {
|
|
|
478
534
|
isFeatured Boolean?
|
|
479
535
|
isTrending Boolean?
|
|
480
536
|
venueId String?
|
|
481
|
-
averageRating Float?
|
|
482
|
-
totalRatings Int?
|
|
483
|
-
totalReviews Int?
|
|
484
|
-
totalFeedRatings Int?
|
|
485
|
-
allowDonations Boolean?
|
|
537
|
+
averageRating Float? @default(0)
|
|
538
|
+
totalRatings Int? @default(0) // Total count of all ratings (Review + BashFeedRating)
|
|
539
|
+
totalReviews Int? @default(0) // Count of Review records (anonymous quick ratings)
|
|
540
|
+
totalFeedRatings Int? @default(0) // Count of BashFeedRating records (from posts)
|
|
541
|
+
allowDonations Boolean? @default(true)
|
|
486
542
|
suggestedDonationAmount Int?
|
|
487
543
|
donationDetails String?
|
|
488
|
-
absorbDonationFees Boolean
|
|
489
|
-
absorbTicketFees Boolean
|
|
490
|
-
showAttendees Boolean
|
|
544
|
+
absorbDonationFees Boolean @default(false)
|
|
545
|
+
absorbTicketFees Boolean @default(false)
|
|
546
|
+
showAttendees Boolean @default(true)
|
|
491
547
|
servicePreferences Json? // New tiered status: { "Entertainment": "need", "Sponsors": "booked_closed", ... }
|
|
492
548
|
bookedServices Json? // Booked service details: { "Entertainment": { serviceId: "...", providerId: "...", bookedAt: "..." }, ... }
|
|
493
549
|
serviceVisibility Json? // DEPRECATED: Use servicePreferences instead. Kept for backward compatibility during migration.
|
|
494
550
|
originalCreatorId String?
|
|
495
551
|
transferredAt DateTime?
|
|
496
552
|
transferredFromId String?
|
|
497
|
-
transferCount Int
|
|
498
|
-
startTimeLocked Boolean
|
|
553
|
+
transferCount Int @default(0)
|
|
554
|
+
startTimeLocked Boolean @default(false)
|
|
499
555
|
p2pPaymentMethod String?
|
|
500
556
|
venmoUsername String?
|
|
501
557
|
venmoQRCodeUrl String?
|
|
@@ -510,48 +566,50 @@ model BashEvent {
|
|
|
510
566
|
itinerary Json? // Array of { id: string, title: string, startTime: string, endTime: string, description?: string }
|
|
511
567
|
associatedBashesReferencingMe AssociatedBash[]
|
|
512
568
|
comments BashComment[]
|
|
513
|
-
amountOfGuests AmountOfGuests?
|
|
514
|
-
club Club?
|
|
515
|
-
creator User
|
|
516
|
-
targetAudience TargetAudience?
|
|
517
|
-
transferredFrom User?
|
|
518
|
-
venue Venue?
|
|
569
|
+
amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
|
|
570
|
+
club Club? @relation(fields: [clubId], references: [id])
|
|
571
|
+
creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
572
|
+
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
|
|
573
|
+
transferredFrom User? @relation("TransferredFrom", fields: [transferredFromId], references: [id])
|
|
574
|
+
venue Venue? @relation(fields: [venueId], references: [id])
|
|
519
575
|
messages BashEventMessage[]
|
|
520
576
|
transferRequests BashEventTransferRequest[]
|
|
577
|
+
updateNotificationQueue EventUpdateNotificationQueue[]
|
|
521
578
|
slugHistory BashSlugHistory[]
|
|
522
579
|
checkouts Checkout[]
|
|
523
580
|
competitions Competition[]
|
|
524
581
|
coordinates Coordinates[]
|
|
525
582
|
links EventLink[]
|
|
526
583
|
eventTasks EventTask[]
|
|
527
|
-
exhibitorBookingRequests ExhibitorBookingRequest[]
|
|
584
|
+
exhibitorBookingRequests ExhibitorBookingRequest[] @relation("ExhibitorBookingEvent")
|
|
528
585
|
investments Investment[]
|
|
529
586
|
invitations Invitation[]
|
|
530
587
|
notificationsReferencingMe Notification[]
|
|
588
|
+
sentReminders SentReminder[]
|
|
531
589
|
recurrence Recurrence?
|
|
532
590
|
reviews Review[]
|
|
533
591
|
serviceBookings ServiceBooking[]
|
|
534
|
-
sponsorBookingRequests SponsorBookingRequest[]
|
|
592
|
+
sponsorBookingRequests SponsorBookingRequest[] @relation("SponsorBookingEvent")
|
|
535
593
|
sponsorships SponsoredEvent[]
|
|
536
594
|
tickets Ticket[]
|
|
537
595
|
ticketTiers TicketTier[]
|
|
538
596
|
favoritedBy UserFavorite[]
|
|
539
597
|
userPromoCodeRedemption UserPromoCodeRedemption[]
|
|
540
598
|
userReport UserReport[]
|
|
541
|
-
vendorBookingRequests VendorBookingRequest[]
|
|
542
|
-
media Media[]
|
|
543
|
-
associatedServicesReferencingMe Service[]
|
|
599
|
+
vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingEvent")
|
|
600
|
+
media Media[] @relation("BashEventToMedia")
|
|
601
|
+
associatedServicesReferencingMe Service[] @relation("BashEventToService")
|
|
544
602
|
userConnections UserConnection[]
|
|
545
603
|
aiRecommendationLogs AIRecommendationLog[]
|
|
546
604
|
aiRecommendationCaches AIRecommendationCache[]
|
|
547
605
|
// Template tracking
|
|
548
606
|
templateId String?
|
|
549
|
-
template BashEventTemplate?
|
|
607
|
+
template BashEventTemplate? @relation("CreatedFromTemplate", fields: [templateId], references: [id])
|
|
550
608
|
// Recurring event fields (for child occurrences)
|
|
551
|
-
isRecurringChild Boolean
|
|
609
|
+
isRecurringChild Boolean @default(false)
|
|
552
610
|
parentEventId String?
|
|
553
|
-
parentEvent BashEvent?
|
|
554
|
-
childEvents BashEvent[]
|
|
611
|
+
parentEvent BashEvent? @relation("RecurringEventChildren", fields: [parentEventId], references: [id], onDelete: SetNull)
|
|
612
|
+
childEvents BashEvent[] @relation("RecurringEventChildren")
|
|
555
613
|
occurrenceIndex Int? // 1, 2, 3... for child events
|
|
556
614
|
|
|
557
615
|
// BashFeed Relations
|
|
@@ -1220,6 +1278,7 @@ model User {
|
|
|
1220
1278
|
promoterStats PromoterStats?
|
|
1221
1279
|
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
1222
1280
|
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
1281
|
+
sentReminders SentReminder[]
|
|
1223
1282
|
reviews Review[]
|
|
1224
1283
|
firstFreeListingId String?
|
|
1225
1284
|
createdServices Service[] @relation("CreatedService")
|
|
@@ -1292,6 +1351,8 @@ model User {
|
|
|
1292
1351
|
bashFeedRatings BashFeedRating[]
|
|
1293
1352
|
bashFeedReports BashFeedReport[]
|
|
1294
1353
|
reviewedFeedReports BashFeedReport[] @relation("ReviewedReports")
|
|
1354
|
+
bashFeedSaves BashFeedSave[]
|
|
1355
|
+
bashFeedReposts BashFeedRepost[]
|
|
1295
1356
|
|
|
1296
1357
|
// Nomination Relations
|
|
1297
1358
|
nominationsReceived Nomination[] @relation("NominatedUser")
|
|
@@ -2324,6 +2385,7 @@ model ServiceBooking {
|
|
|
2324
2385
|
messages ServiceBookingMessage[]
|
|
2325
2386
|
packages ServiceBookingPackage[]
|
|
2326
2387
|
commissions BookingCommission[] @relation("BookingCommissions")
|
|
2388
|
+
sentReminders SentReminder[]
|
|
2327
2389
|
|
|
2328
2390
|
@@index([status])
|
|
2329
2391
|
@@index([creatorId])
|
|
@@ -2682,6 +2744,24 @@ model BashEventTransferRequest {
|
|
|
2682
2744
|
@@index([fromUserId])
|
|
2683
2745
|
}
|
|
2684
2746
|
|
|
2747
|
+
model EventUpdateNotificationQueue {
|
|
2748
|
+
id String @id @default(cuid())
|
|
2749
|
+
bashEventId String
|
|
2750
|
+
scheduledFor DateTime // When to send the notification (5 minutes after last change)
|
|
2751
|
+
changes Json // Array of change objects: [{ field, oldValue, newValue, description }]
|
|
2752
|
+
oldEventSnapshot Json // Complete snapshot of event before any changes
|
|
2753
|
+
createdAt DateTime @default(now())
|
|
2754
|
+
updatedAt DateTime @updatedAt
|
|
2755
|
+
status String @default("pending") // pending, sent, cancelled
|
|
2756
|
+
sentAt DateTime?
|
|
2757
|
+
errorMessage String?
|
|
2758
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
2759
|
+
|
|
2760
|
+
@@index([bashEventId])
|
|
2761
|
+
@@index([scheduledFor, status])
|
|
2762
|
+
@@index([status])
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2685
2765
|
model BlogPost {
|
|
2686
2766
|
id String @id @default(cuid())
|
|
2687
2767
|
title String
|
|
@@ -5188,3 +5268,9 @@ model NominationVote {
|
|
|
5188
5268
|
@@index([nominationId])
|
|
5189
5269
|
@@index([voterId])
|
|
5190
5270
|
}
|
|
5271
|
+
|
|
5272
|
+
enum EventFormat {
|
|
5273
|
+
InPerson
|
|
5274
|
+
Virtual
|
|
5275
|
+
Hybrid
|
|
5276
|
+
}
|