@bash-app/bash-common 22.0.2 → 23.1.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.
@@ -1,1397 +1,1410 @@
1
- // This is your Prisma schema file,
2
- // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
-
4
- generator client {
5
- provider = "prisma-client-js"
6
- }
7
-
8
- datasource db {
9
- provider = "postgresql"
10
- url = env("POSTGRES_PRISMA_URL") // uses connection pooling
11
- directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
12
- }
13
-
14
- model Club {
15
- id String @id @default(cuid())
16
- name String
17
- street String
18
- userId String
19
- price Int?
20
- events BashEvent[]
21
- members ClubMember[]
22
- admin ClubAdmin[]
23
- }
24
-
25
- model ClubAdmin {
26
- id String @id @default(cuid())
27
- admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
28
- userId String
29
- club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
30
- clubId String
31
- role ClubAdminRole
32
- }
33
-
34
- model ClubMember {
35
- id String @id @default(cuid())
36
- member User @relation(fields: [userId], references: [id], onDelete: Cascade)
37
- userId String
38
- club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
39
- clubId String
40
- status ClubMemberStatus
41
- statusHistory Json
42
- price Int?
43
- }
44
-
45
- enum ClubAdminRole {
46
- Owner
47
- Admin
48
- Staff
49
- }
50
-
51
- enum ClubMemberStatus {
52
- Active
53
- Inactive
54
- Cancelled
55
- Paused
56
- Removed
57
- }
58
-
59
- model BashComment {
60
- id String @id @default(cuid())
61
- creatorId String
62
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
63
- content String
64
- reviewId String?
65
- review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
66
- bashEventId String?
67
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
68
- parentCommentId String?
69
- parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
70
- replies BashComment[] @relation("CommentReplies")
71
- }
72
-
73
- model Competition {
74
- id String @id @default(cuid())
75
- name String
76
- description String
77
- owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
78
- prizes Prize[]
79
- userId String
80
- sponser CompetitionSponsor[]
81
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
82
- bashEventId String
83
- numberOfPrizes Int
84
- }
85
-
86
- model CompetitionSponsor {
87
- id String @id @default(cuid())
88
- competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
89
- sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
90
- competitionId String
91
- userId String
92
- description String
93
- paidOn String?
94
- }
95
-
96
- model EventTask {
97
- id String @id @default(cuid())
98
- creatorId String
99
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
100
- bashEventId String
101
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
102
- description String
103
- assignedToId String?
104
- assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
105
- status TaskStatus?
106
- bashNotificationsReferencingMe BashNotification[]
107
- createdAt DateTime? @default(now())
108
- }
109
-
110
- enum TaskStatus {
111
- Accepted
112
- Rejected
113
- Completed
114
- }
115
-
116
- model Reminder {
117
- id String @id @default(cuid())
118
- creatorId String
119
- creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
120
- remindWhoId String?
121
- remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
122
- remindDateTime DateTime
123
- notificationId String
124
- notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
125
- }
126
-
127
- model BashEventPromoCode {
128
- id String @id @default(cuid())
129
- code String
130
- ticketTierId String
131
- ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
132
- stripeCouponId String?
133
- discountAmountInCents Int?
134
- discountAmountPercentage Int?
135
- maxRedemptions Int?
136
- redeemBy DateTime?
137
- usedBy User[]
138
-
139
- @@unique([ticketTierId, code])
140
- }
141
-
142
- model BashNotification {
143
- id String @id @default(cuid())
144
- creatorId String
145
- creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
146
- email String
147
- createdDateTime DateTime @default(now())
148
- message String
149
- image String?
150
- readDateTime DateTime?
151
- taskId String?
152
- eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
153
- invitationId String?
154
- invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
155
- bashEventId String?
156
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
157
- reminders Reminder[]
158
- redirectUrl String?
159
-
160
- @@unique([creatorId, email, bashEventId])
161
- @@unique([creatorId, email, invitationId])
162
- @@index([creatorId])
163
- }
164
-
165
- model Invitation {
166
- id String @id @default(cuid())
167
- creatorId String
168
- creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
169
- email String
170
- sentToId String?
171
- sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
172
- bashEventId String?
173
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
174
- image String?
175
- phone String?
176
- name String?
177
- message String?
178
- inviteDate DateTime? @default(now())
179
- acceptedDate DateTime?
180
- rejectedDate DateTime?
181
- maybeDate DateTime?
182
- tickets Ticket[] @relation("TicketsForInvitation")
183
- bashNotifications BashNotification[]
184
- associatedBash AssociatedBash?
185
-
186
- @@index([email])
187
- }
188
-
189
- model BashEvent {
190
- id String @id @default(cuid())
191
- title String
192
- creatorId String
193
- creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
194
- description String?
195
- eventType String @default("Other")
196
- startDateTime DateTime? @default(now())
197
- endDateTime DateTime? @default(now())
198
- ticketTiers TicketTier[]
199
- targetAudienceId String? @unique
200
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
201
- amountOfGuestsId String? @unique
202
- amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
203
- recurrence Recurrence?
204
- vibe String?
205
- occasion String?
206
- dress String?
207
- allowed String?
208
- notAllowed String?
209
- nonProfit Boolean?
210
- nonProfitId String?
211
- privacy Privacy @default(Public)
212
- tickets Ticket[]
213
- reviews Review[]
214
- sponsorships SponsoredEvent[]
215
- investments Investment[]
216
- capacity Int?
217
- location String?
218
- status BashStatus @default(Draft)
219
- tags String[]
220
- coverPhoto String?
221
- media Media[]
222
- club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
223
- clubId String?
224
- links EventLink[]
225
- competitions Competition[]
226
- invitations Invitation[]
227
- dateTimePublished DateTime?
228
- comments BashComment[]
229
- includedItems String[]
230
- associatedBashesReferencingMe AssociatedBash[]
231
- bashNotificationsReferencingMe BashNotification[]
232
- checkouts Checkout[]
233
- eventTasks EventTask[]
234
- videoLink String?
235
- subtitle String?
236
- isFeatured Boolean?
237
- isTrending Boolean?
238
- }
239
-
240
- model Checkout {
241
- id String @id @default(cuid())
242
- ownerId String
243
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
244
- bashEventId String
245
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
246
- checkoutDateTime DateTime? @default(now())
247
- tickets Ticket[]
248
- stripeCheckoutSessionId String? @unique
249
- bookings Booking[]
250
-
251
- @@index(bashEventId)
252
- }
253
-
254
- model TicketTier {
255
- id String @id @default(cuid())
256
- bashEventId String
257
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
258
- tickets Ticket[]
259
- waitList User[]
260
- price Int @default(0)
261
- title String @default("Free")
262
- sortOrder Int?
263
- description String?
264
- maximumNumberOfTickets Int @default(100)
265
- maximumTicketCount Int @default(100)
266
- isDonationTier Boolean?
267
- hidden Boolean?
268
- promoCodes BashEventPromoCode[]
269
-
270
- @@unique([bashEventId, title])
271
- }
272
-
273
- model Ticket {
274
- id String @id @default(cuid())
275
- ownerId String
276
- owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
277
- bashEventId String
278
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
279
- ticketTierId String?
280
- ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
281
- validDate DateTime?
282
- forUserId String?
283
- forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
284
- fullName String?
285
- email String?
286
- paidOn DateTime?
287
- allowPromiseToPay Boolean?
288
- status TicketStatus?
289
- isFreeGuest Boolean?
290
- geoFenceCheckInUnnecessary Boolean?
291
- checkedInAt DateTime?
292
- checkedOutAt DateTime?
293
- invitationId String?
294
- invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
295
- checkoutId String?
296
- checkout Checkout? @relation(fields: [checkoutId], references: [id])
297
- ServiceCheckout ServiceCheckout? @relation(fields: [serviceCheckoutId], references: [id])
298
- serviceCheckoutId String?
299
-
300
- @@index([bashEventId])
301
- }
302
-
303
- enum TicketStatus {
304
- Cancelled
305
- Attended
306
- Missed
307
- }
308
-
309
- model ServiceCheckout {
310
- id String @id @default(cuid())
311
- ownerId String
312
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
313
- checkoutDateTime DateTime? @default(now())
314
- tickets Ticket[]
315
- stripeCheckoutSessionId String? @unique
316
- }
317
-
318
- model UserSubscription {
319
- id String @id @default(cuid())
320
- ownerId String @unique
321
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
322
- type UserSubscriptionType
323
- }
324
-
325
- enum UserSubscriptionType {
326
- Free
327
- Premium
328
- VIP
329
- }
330
-
331
- model ServiceSubscription {
332
- id String @id @default(cuid())
333
- ownerId String
334
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
335
- slots Int @default(0)
336
- stripeSubscriptionId String?
337
- }
338
-
339
- enum BookingStatus {
340
- Cancelled
341
- Completed
342
- Missed
343
- }
344
-
345
- model Booking {
346
- id String @id @default(cuid())
347
- businessId String
348
- business Business @relation(fields: [businessId], references: [id])
349
- validDate DateTime?
350
- forUserId String?
351
- forUser User? @relation(fields: [forUserId], references: [id])
352
- fullName String?
353
- email String?
354
- paidOn DateTime?
355
- requireDeposit Boolean?
356
- status BookingStatus?
357
- geoFenceCheckInUnnecessary Boolean?
358
- checkedInAt DateTime?
359
- checkedOutAt DateTime?
360
- checkoutId String?
361
- checkout Checkout? @relation(fields: [checkoutId], references: [id])
362
-
363
- @@index([businessId])
364
- @@index([forUserId])
365
- @@index([checkoutId])
366
- }
367
-
368
- model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
369
- id String @id @default(cuid())
370
- doNotUseVibeEnum BashEventVibeTags @default(Wild)
371
- doNotUseDressEnum BashEventDressTags @default(Casual)
372
- doNotUseBashEventType BashEventType @default(Other)
373
- doNotUseDayOfWeek DayOfWeek @default(Sunday)
374
- }
375
-
376
- model Recurrence {
377
- id String @id @default(cuid())
378
- interval Int @default(1)
379
- bashEventId String @unique
380
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
381
- frequency RecurringFrequency @default(Never)
382
- ends DateTime @default(now())
383
- repeatOnDays DayOfWeek[]
384
- repeatOnDayOfMonth Int?
385
- repeatYearlyDate DateTime?
386
- }
387
-
388
- enum DayOfWeek {
389
- Sunday
390
- Monday
391
- Tuesday
392
- Wednesday
393
- Thursday
394
- Friday
395
- Saturday
396
- }
397
-
398
- enum RecurringFrequency {
399
- Never
400
- Daily
401
- Weekly
402
- Monthly
403
- Yearly
404
- }
405
-
406
- enum BashEventVibeTags {
407
- Wild
408
- Calm
409
- }
410
-
411
- enum BashEventDressTags {
412
- Casual
413
- BusinessCasual
414
- Formal
415
- }
416
-
417
- // enum ServicesTags {
418
- // Fast
419
- // Reliable
420
- // AwardRecipient
421
- // }
422
-
423
- enum BashEventType {
424
- AfterParty
425
- AnimeAndCosplayFestival
426
- AnniversaryCelebration
427
- ArtExhibitOpening
428
- ArtAndCraftNight
429
- BBQCookout
430
- BabyShower
431
- BachelorOrBacheloretteParty
432
- BeachParty
433
- Birthday
434
- BoatPartyOrCruise
435
- Bonfire
436
- BookClubMeeting
437
- BridalShower
438
- BrunchGathering
439
- CarShow
440
- CarnivalAndFair
441
- CasinoNight
442
- CasualMixer
443
- CharityBall
444
- CharityFundraiser
445
- ChristmasParty
446
- ChurchEvent
447
- CircusOrCarnivalParty
448
- CocktailParty
449
- CollegeParty_FraternityOrSorority
450
- ComedyShowOrStandUpComedyNight
451
- ComicConvention
452
- Competition
453
- Concert
454
- CookingCompetition
455
- CorporateEventOrOfficeParty
456
- CostumeParty_Theme_Based
457
- CulturalFestival
458
- DanceParty
459
- DesertRave
460
- DiscoNight
461
- EasterGathering
462
- EngagementParty
463
- ESportsGamingTournament
464
- ExclusiveLuxuryRetreat
465
- FantasyThemedParty
466
- FashionShow
467
- Fireside
468
- FitnessFestival
469
- FlashMob
470
- Festival
471
- FestivalFilm
472
- FestivalFood
473
- FundraisingEvent
474
- GalaDinner
475
- GameNight
476
- GamingEvent
477
- GardenParty
478
- GoingAwayPartyOrFarewell
479
- GraduationParty
480
- HalloweenCostumeParty
481
- HanukkahParty
482
- HistoricalEraParty
483
- HolidayParty
484
- HouseParty
485
- HousewarmingParty
486
- KaraokeNight
487
- KiteFlyingFestival
488
- LiveBandPerformanceInALocalVenue
489
- Luau
490
- MansionParty
491
- MardiGras
492
- MasqueradeBall
493
- MotorcycleRally
494
- MovieNight
495
- MoviePremiere
496
- MusicFestival
497
- NewYearsEveCelebration
498
- OpenMicNight
499
- OutdoorActivity
500
- OutdoorConcert
501
- OutdoorMovieNight_WithAProjector
502
- Parade
503
- Party
504
- PoolParty
505
- Potluck
506
- PotluckVegan
507
- PreParty
508
- ProductLaunch
509
- ProfessionalNetworkingEvent
510
- Rave_General
511
- RetirementCelebration
512
- Reunion_FamilyOrSchoolOrFriends
513
- SafariAdventureParty
514
- SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
515
- ScienceFictionThemedParty
516
- SocialClubEvent
517
- SportsTournament
518
- SportsWatchParty
519
- SuperheroThemedParty
520
- SurfCompetition
521
- ThanksgivingDinner
522
- ThemedCostumeParty
523
- ThemedDinnerParty
524
- ThemedPubCrawl
525
- Tournament
526
- TravelAndTradeShow
527
- TriviaNight
528
- ValentinesDayParty
529
- WeddingReception
530
- WelcomeHomeParty
531
- WellnessFestival
532
- WineTastingEvent
533
- Other
534
- }
535
-
536
- model CustomBashEventType {
537
- id String @id @default(cuid())
538
- key String @unique
539
- displayName String
540
- }
541
-
542
- model AmountOfGuests {
543
- id String @id @default(cuid())
544
- bashEvent BashEvent?
545
- venue Venue?
546
- exhibitor Exhibitor?
547
- eventService EventService?
548
- entertainmentService EntertainmentService?
549
- vendor Vendor?
550
- sponsor Sponsor?
551
- organization Organization?
552
-
553
- minimum Int? @default(10)
554
- ideal Int? @default(35)
555
- showMinimumGuests Boolean @default(true)
556
- showIdealGuests Boolean @default(true)
557
- }
558
-
559
- enum Privacy {
560
- Public
561
- ConnectionsOnly
562
- InviteOnly
563
- }
564
-
565
- model TargetAudience {
566
- id String @id @default(cuid())
567
- ageRange AgeRange @default(NoPreference)
568
- gender Gender @default(NoPreference)
569
- occupation Occupation @default(NoPreference)
570
- education Education @default(NoPreference)
571
- showOnDetailPage Boolean @default(true)
572
-
573
- bashEvent BashEvent?
574
- business Business?
575
- venue Venue?
576
- vendor Vendor?
577
- eventService EventService?
578
- entertainmentService EntertainmentService?
579
- exhibitor Exhibitor?
580
- sponsor Sponsor?
581
- organization Organization?
582
- }
583
-
584
- enum AgeRange {
585
- Eighteen_24
586
- TwentyFive_34
587
- ThirtyFive_49
588
- FiftyPlus
589
- NoPreference
590
- }
591
-
592
- enum Occupation {
593
- Student
594
- Startups
595
- SMBs
596
- Corporations
597
- Professional
598
- AngelInvestors
599
- FamilyOffice
600
- Retired
601
- NoPreference
602
- }
603
-
604
- enum Education {
605
- HighSchool
606
- InCollege
607
- Bachelors
608
- Masters
609
- Doctorate
610
- NoPreference
611
- }
612
-
613
- enum BashStatus {
614
- Draft
615
- PreSale
616
- Published
617
- }
618
-
619
- enum ServiceStatus {
620
- Draft
621
- Created
622
- }
623
-
624
- model DocumentID {
625
- id String @id @default(cuid())
626
- givenName String?
627
- familyName String?
628
- middleName String?
629
- suffix String?
630
- street String?
631
- city String?
632
- state String?
633
- stateName String?
634
- zipCode String?
635
- idNumber String?
636
- expires String?
637
- dob String?
638
- issueDate String?
639
- idType String?
640
- userId String? @unique
641
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
642
- }
643
-
644
- model EventLink {
645
- id String @id @default(cuid())
646
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
647
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
648
- linkId String
649
- bashEventId String
650
- }
651
-
652
- enum Gender {
653
- Male
654
- Female
655
- Other
656
- NoPreference
657
- }
658
-
659
- model Investment {
660
- id String @id @default(cuid())
661
- investorId String
662
- bashEventId String
663
- investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
664
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
665
- amount Float
666
- type InvestmentType
667
- paidOn String?
668
- }
669
-
670
- enum InvestmentType {
671
- Equity
672
- Event
673
- }
674
-
675
- model Link {
676
- id String @id @default(cuid())
677
- url String
678
- type String?
679
- icon String?
680
- eventLinks EventLink[]
681
- userLinks UserLink[]
682
- serviceLinks ServiceLink[]
683
- }
684
-
685
- model Media {
686
- id String @id @default(cuid())
687
- url String @unique
688
- type MediaType
689
- mimetype String?
690
- bashEventsReferencingMe BashEvent[]
691
- sponsoredEventsReferencingMe SponsoredEvent[]
692
- businessesReferencingMe Business[]
693
- venueReferencingMe Venue[]
694
- EventService EventService? @relation(fields: [eventServiceId], references: [id])
695
- eventServiceId String?
696
- entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
697
- entertainmentServiceId String?
698
- vendor Vendor? @relation(fields: [vendorId], references: [id])
699
- vendorId String?
700
- exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
701
- exhibitorId String?
702
- sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
703
- sponsorId String?
704
- organization Organization? @relation(fields: [organizationId], references: [id])
705
- organizationId String?
706
- }
707
-
708
- enum MediaType {
709
- Unknown
710
- Empty
711
- Image
712
- Video
713
- }
714
-
715
- model Prize {
716
- id String @id @default(cuid())
717
- prizeWorth Float?
718
- prizeType PrizeType
719
- name String
720
- prizeLevel Int
721
- description String
722
- competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
723
- competitionId String?
724
- paidOn String?
725
- winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
726
- winnerUserId String?
727
- }
728
-
729
- enum PrizeType {
730
- Monetary
731
- Merchandise
732
- Service
733
- Combo
734
- }
735
-
736
- model Review {
737
- id String @id @default(cuid())
738
- rating Int
739
- creatorId String
740
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
741
- bashEventId String
742
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
743
- comments BashComment[]
744
- }
745
-
746
- model Session {
747
- id String @id @default(cuid())
748
- sessionToken String @unique
749
- userId String
750
- expires DateTime
751
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
752
-
753
- @@index([userId])
754
- }
755
-
756
- enum Sex {
757
- Male
758
- Female
759
- Other
760
- }
761
-
762
- model SponsoredEvent {
763
- id String @id @default(cuid())
764
- amount Float?
765
- paidOn String?
766
- sponsorType SponsorType
767
- sponsorId String
768
- bashEventId String
769
- sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
770
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
771
- media Media[]
772
- }
773
-
774
- enum SponsorType {
775
- Marketing
776
- Giveaway
777
- Awareness
778
- Trade
779
- CompetitionPrizeProvider
780
- }
781
-
782
- model User {
783
- id String @id @default(cuid())
784
- email String @unique
785
- createdOn DateTime @default(now())
786
- stripeCustomerId String? @unique
787
- stripeAccountId String? @unique
788
- googleCalendarAccess String?
789
- givenName String?
790
- familyName String?
791
- hash String?
792
- emailVerified DateTime?
793
- image String?
794
- uploadedImage String?
795
- dob DateTime?
796
- gender Gender?
797
- sex Sex?
798
- roles UserRole[] @default([User])
799
- businesses Business[]
800
- createdEvents BashEvent[] @relation("CreatedEvent")
801
- ticketsISent Ticket[] @relation("TicketsISent")
802
- ticketsIOwn Ticket[] @relation("TicketsIOwn")
803
- reviews Review[]
804
- sponsorships SponsoredEvent[]
805
- investments Investment[]
806
- sessions Session[]
807
- eventTasks EventTask[]
808
- clubMembers ClubMember[]
809
- clubAdmins ClubAdmin[]
810
- links UserLink[]
811
- status UserStatus
812
- competitions Competition[]
813
- competitionSponsorships CompetitionSponsor[]
814
- competitionPrizes Prize[]
815
- userRatingGiven UserRatingGiven[]
816
- userRating UserRating[]
817
- magicLink String?
818
- magicLinkExpiration DateTime?
819
- magicLinkUsed DateTime?
820
- idVerified DateTime?
821
- street String?
822
- city String?
823
- state String?
824
- zipCode String?
825
- country String? @default("US")
826
- phone String?
827
- documentIDId String? @unique
828
- documentID DocumentID?
829
- comment BashComment[]
830
- associatedBashes AssociatedBash[]
831
- invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
832
- invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
833
- notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
834
- remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
835
- remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
836
- eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
837
- checkouts Checkout[]
838
- ticketTiersWaitListsIveJoined TicketTier[]
839
- contacts Contact[]
840
- bashEventPromoCodesIUsed BashEventPromoCode[]
841
- serviceCheckouts ServiceCheckout[]
842
- bookingForMe Booking[]
843
- userSubscription UserSubscription?
844
- serviceSubcriptions ServiceSubscription[]
845
- }
846
-
847
- model Contact {
848
- id String @id @default(cuid())
849
- contactOwnerId String
850
- contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
851
- contactEmail String?
852
- fullName String?
853
- phone String?
854
- requestToConnectSent DateTime?
855
- requestToConnectAccepted DateTime?
856
-
857
- @@unique([contactOwnerId, contactEmail])
858
- @@index([contactEmail])
859
- }
860
-
861
- model AssociatedBash {
862
- id String @id @default(cuid())
863
- bashEventId String
864
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
865
- invitationId String? @unique
866
- invitation Invitation? @relation(fields: [invitationId], references: [id])
867
- ownerEmail String?
868
- ownerUserId String?
869
- owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
870
- isOrganizer Boolean?
871
- isFavorite Boolean?
872
-
873
- @@unique([ownerEmail, bashEventId])
874
- }
875
-
876
- model Business {
877
- id String @id @default(cuid())
878
- ownerId String
879
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
880
- dateCreated DateTime @default(now())
881
- email String
882
- street String
883
- city String
884
- state String
885
- zipCode String
886
- country String
887
- phone String
888
- name String @default("New Business")
889
- coverPhoto String?
890
- agreedToAgreement Boolean?
891
- media Media[]
892
- customServiceTag String[]
893
- yearsOfExperince YearsOfExperience @default(LessThanOneYear)
894
- serviceLinks ServiceLink[]
895
- description String?
896
- canContact Boolean?
897
- // musicGenre MusicGenreType?
898
- visibility VisibilityPreference @default(Public)
899
- // bashesInterestedIn BashEventType[]
900
- status ServiceStatus @default(Draft)
901
- venues Venue[]
902
- targetAudienceId String? @unique
903
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
904
- volunteerService VolunteerService?
905
- eventServices EventService[]
906
- entertainmentServices EntertainmentService[]
907
- vendors Vendor[]
908
- exhibitor Exhibitor[]
909
- sponsors Sponsor[]
910
- organizations Organization[]
911
- trademark String?
912
- manager String?
913
- dba String?
914
- contactPerson String?
915
- contactPhone String?
916
- contactEmail String?
917
- businessPhone String?
918
- bookings Booking[]
919
-
920
- @@index([email])
921
- @@index([phone])
922
- }
923
-
924
- model VolunteerService {
925
- id String @id @default(cuid())
926
- businessId String @unique
927
- business Business @relation(fields: [businessId], references: [id])
928
- }
929
-
930
- model EventService {
931
- id String @id @default(cuid())
932
- business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
933
- businessId String
934
- eventServiceName String
935
- eventServiceTypes EventServiceType[]
936
- eventServiceSubType String?
937
- email String
938
- street String
939
- city String
940
- state String
941
- zipCode String
942
- country String
943
- phone String
944
- coverPhoto String?
945
- media Media[]
946
- visibility VisibilityPreference @default(Public)
947
- status ServiceStatus @default(Draft)
948
- yearsOfExperience YearsOfExperience
949
- description String?
950
- crowdSizeId String? @unique
951
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
952
- additionalInfo String?
953
- goodsOrServices String[]
954
- menuItems String?
955
- venueTypes String[]
956
- availableDateTimes Availability[] @relation("AvailableDateTimes")
957
- mission String?
958
- communityInvolvement String?
959
- emergencyContact String?
960
- contactDetails String?
961
- rates String?
962
- cancellationPolicy String?
963
- refundPolicy String?
964
- insurancePolicy String?
965
- bashesInterestedIn BashEventType[]
966
- links ServiceLink[]
967
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
968
- targetAudienceId String? @unique
969
- }
970
-
971
- model EntertainmentService {
972
- id String @id @default(cuid())
973
- business Business @relation(fields: [businessId], references: [id])
974
- businessId String
975
- entertainmentServiceName String
976
- entertainmentServiceTypes EntertainmentServiceType[]
977
- entertainmentServiceSubType String?
978
- genre MusicGenreType?
979
- email String
980
- street String
981
- city String
982
- state String
983
- zipCode String
984
- country String
985
- phone String
986
- coverPhoto String?
987
- media Media[]
988
- visibility VisibilityPreference @default(Public)
989
- status ServiceStatus @default(Draft)
990
- yearsOfExperience YearsOfExperience
991
- description String?
992
- crowdSizeId String? @unique
993
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
994
- additionalInfo String?
995
- goodsOrServices String[]
996
- venueTypes String[]
997
- availableDateTimes Availability[] @relation("AvailableDateTimes")
998
- mission String?
999
- communityInvolvement String?
1000
- emergencyContact String?
1001
- contactDetails String?
1002
- rates String?
1003
- cancellationPolicy String?
1004
- refundPolicy String?
1005
- insurancePolicy String?
1006
- bashesInterestedIn BashEventType[]
1007
- links ServiceLink[]
1008
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1009
- targetAudienceId String? @unique
1010
- }
1011
-
1012
- model Vendor {
1013
- id String @id @default(cuid())
1014
- business Business @relation(fields: [businessId], references: [id])
1015
- businessId String
1016
- vendorName String
1017
- email String
1018
- street String
1019
- city String
1020
- state String
1021
- zipCode String
1022
- country String
1023
- phone String
1024
- coverPhoto String?
1025
- media Media[]
1026
- visibility VisibilityPreference @default(Public)
1027
- status ServiceStatus @default(Draft)
1028
- yearsOfExperience YearsOfExperience
1029
- description String?
1030
- crowdSizeId String? @unique
1031
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1032
- additionalInfo String?
1033
- goodsOrServices String[]
1034
- menuItems String?
1035
- venueTypes String[]
1036
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1037
- mission String?
1038
- communityInvolvement String?
1039
- emergencyContact String?
1040
- contactDetails String?
1041
- rates String?
1042
- cancellationPolicy String?
1043
- refundPolicy String?
1044
- insurancePolicy String?
1045
- bashesInterestedIn BashEventType[]
1046
- links ServiceLink[]
1047
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1048
- targetAudienceId String? @unique
1049
- }
1050
-
1051
- model Exhibitor {
1052
- id String @id @default(cuid())
1053
- business Business @relation(fields: [businessId], references: [id])
1054
- businessId String
1055
- exhibitorName String
1056
- email String
1057
- street String
1058
- city String
1059
- state String
1060
- zipCode String
1061
- country String
1062
- phone String
1063
- coverPhoto String?
1064
- media Media[]
1065
- visibility VisibilityPreference @default(Public)
1066
- yearsOfExperience YearsOfExperience
1067
- description String?
1068
- crowdSizeId String? @unique
1069
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1070
- targetAudienceId String? @unique
1071
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1072
- additionalInfo String?
1073
- goodsOrServices String[]
1074
- venueTypes String[]
1075
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1076
- status ServiceStatus @default(Draft)
1077
- mission String?
1078
- communityInvolvement String?
1079
- emergencyContact String?
1080
- contactDetails String?
1081
- rates String?
1082
- cancellationPolicy String?
1083
- refundPolicy String?
1084
- insurancePolicy String?
1085
- bashesInterestedIn BashEventType[]
1086
- links ServiceLink[]
1087
- }
1088
-
1089
- model Sponsor {
1090
- id String @id @default(cuid())
1091
- business Business @relation(fields: [businessId], references: [id])
1092
- businessId String
1093
- sponsorName String
1094
- email String
1095
- street String
1096
- city String
1097
- state String
1098
- zipCode String
1099
- country String
1100
- phone String
1101
- coverPhoto String?
1102
- media Media[]
1103
- visibility VisibilityPreference @default(Public)
1104
- status ServiceStatus @default(Draft)
1105
- yearsOfExperience YearsOfExperience
1106
- description String?
1107
- crowdSizeId String? @unique
1108
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1109
- additionalInfo String?
1110
- goodsOrServices String[]
1111
- menuItems String?
1112
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1113
- mission String?
1114
- communityInvolvement String?
1115
- emergencyContact String?
1116
- contactDetails String?
1117
- rates String?
1118
- cancellationPolicy String?
1119
- refundPolicy String?
1120
- insurancePolicy String?
1121
- bashesInterestedIn BashEventType[]
1122
- links ServiceLink[]
1123
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1124
- targetAudienceId String? @unique
1125
- }
1126
-
1127
- model Venue {
1128
- id String @id @default(cuid())
1129
- business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1130
- businessId String
1131
- venueName String
1132
- email String
1133
- street String
1134
- city String
1135
- state String
1136
- zipCode String
1137
- country String
1138
- phone String
1139
- coverPhoto String?
1140
- media Media[]
1141
- visibility VisibilityPreference @default(Public)
1142
- status ServiceStatus @default(Draft)
1143
- yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1144
- description String?
1145
- serviceRangeId String @unique
1146
- serviceRange ServiceRange @relation(fields: [serviceRangeId], references: [id], onDelete: Cascade)
1147
- amenities String[]
1148
- menuItems String?
1149
- additionalInfo String?
1150
- features String[]
1151
- venueTypes String[]
1152
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1153
- // specialDateTimes Availability[] @relation("SpecialDateTimes")
1154
- mission String?
1155
- pitch String?
1156
- communityInvolvement String?
1157
- emergencyContact String?
1158
- contactDetails String?
1159
- rates String?
1160
- cancellationPolicy String?
1161
- refundPolicy String?
1162
- safetyPolicy String?
1163
- insurancePolicy String?
1164
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1165
- targetAudienceId String? @unique
1166
- bashesInterestedIn BashEventType[]
1167
- links ServiceLink[]
1168
- capacity Int? // Maximum number of people the venue can accommodate
1169
- amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
1170
- amountOfGuestsId String? @unique
1171
- }
1172
-
1173
- model Organization {
1174
- id String @id @default(cuid())
1175
- business Business? @relation(fields: [businessId], references: [id])
1176
- businessId String?
1177
- organizationName String
1178
- organizationType OrganizationType[]
1179
- email String
1180
- street String
1181
- city String
1182
- state String
1183
- zipCode String
1184
- country String
1185
- phone String
1186
- coverPhoto String?
1187
- media Media[]
1188
- visibility VisibilityPreference @default(Public)
1189
- status ServiceStatus @default(Draft)
1190
- description String?
1191
- crowdSizeId String? @unique
1192
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1193
- additionalInfo String?
1194
- goodsOrServices String[]
1195
- venueTypes String[]
1196
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1197
- mission String?
1198
- communityInvolvement String?
1199
- emergencyContact String?
1200
- contactDetails String?
1201
- rates String?
1202
- cancellationPolicy String?
1203
- refundPolicy String?
1204
- insurancePolicy String?
1205
- bashesInterestedIn BashEventType[]
1206
- links ServiceLink[]
1207
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1208
- targetAudienceId String? @unique
1209
- }
1210
-
1211
- enum EventServiceType {
1212
- Investor
1213
- LongTermLoan
1214
- ShortTermLoan
1215
- EventPlanning
1216
- Caterer
1217
- Cleaner
1218
- Decorator
1219
- InteriorDesigner
1220
- RentalEquipmentProvider
1221
- FoodAndBeverageProvider
1222
- MediaCapture
1223
- AVTechnician
1224
- GraphicDesigner
1225
- Influencer
1226
- Promoter
1227
- CelebrityAppearance
1228
- CrewHand
1229
- EventManager
1230
- VirtualAssistant
1231
- Consulting
1232
- Transportation
1233
- }
1234
-
1235
- enum EntertainmentServiceType {
1236
- Emcees
1237
- DJs
1238
- Bands
1239
- SoloMusicians
1240
- Comedy
1241
- VarietyActs
1242
- PerformanceArtists
1243
- Magic
1244
- Dancers
1245
- Aerialists
1246
- Impersonators
1247
- Speakers
1248
- Auctioneers
1249
- }
1250
-
1251
- enum OrganizationType {
1252
- Church
1253
- GreekLife
1254
- SocialClub
1255
- Nonprofit
1256
- Corporation
1257
- EducationalInstitution
1258
- Sports
1259
- Government
1260
- Cultural
1261
- Lifestyle
1262
- Political
1263
- Tourism
1264
- Youth
1265
- Senior
1266
- Tradeshow
1267
- Conference
1268
- FoodAndBeverage
1269
- TechAndStartups
1270
- }
1271
-
1272
- enum YearsOfExperience {
1273
- LessThanOneYear
1274
- OneToThreeYears
1275
- ThreeToFiveYears
1276
- FivePlusYears
1277
- }
1278
-
1279
- model ServiceRange {
1280
- id String @id @default(cuid())
1281
- min Int @default(0)
1282
- max Int @default(50)
1283
-
1284
- venue Venue?
1285
- }
1286
-
1287
- model Availability {
1288
- id String @id @default(cuid())
1289
- startDateTime String
1290
- endDateTime String
1291
- venueId String?
1292
- venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1293
- eventServiceId String?
1294
- eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1295
- entertainmentServiceId String?
1296
- entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1297
- vendorId String?
1298
- vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1299
- exhibitorId String?
1300
- exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1301
- sponsorId String?
1302
- sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1303
- organizationId String?
1304
- organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1305
- }
1306
-
1307
- enum VisibilityPreference {
1308
- Public
1309
- Private
1310
- }
1311
-
1312
- enum MusicGenreType {
1313
- Classical
1314
- Rock
1315
- HipHop
1316
- Country
1317
- Pop
1318
- EDM
1319
- Indie
1320
- Acoustic
1321
- }
1322
-
1323
- enum UserRole {
1324
- User
1325
- Vendor
1326
- Sponsor
1327
- Investor
1328
- LoanProvider
1329
- VenueProvider
1330
- ServiceProvider
1331
- SuperAdmin
1332
- Exhibitor
1333
- }
1334
-
1335
- model UserLink {
1336
- id String @id @default(cuid())
1337
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1338
- linkId String
1339
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1340
- userId String
1341
- }
1342
-
1343
- model UserRating {
1344
- id String @id @default(cuid())
1345
- rating Int
1346
- comment String?
1347
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1348
- userRatingGivenId String
1349
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1350
- userId String
1351
- }
1352
-
1353
- model UserRatingGiven {
1354
- id String @id @default(cuid())
1355
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1356
- userId String
1357
- UserRating UserRating[]
1358
- }
1359
-
1360
- enum UserStatus {
1361
- Active
1362
- Inactive
1363
- Suspended
1364
- Deactivated
1365
- }
1366
-
1367
- model VerificationToken {
1368
- identifier String
1369
- token String @unique
1370
- expires DateTime
1371
-
1372
- @@unique([identifier, token])
1373
- }
1374
-
1375
- model ServiceLink {
1376
- id String @id @default(cuid())
1377
- businessId String
1378
- business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1379
- linkId String
1380
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1381
- eventService EventService? @relation(fields: [eventServiceId], references: [id])
1382
- eventServiceId String?
1383
- entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1384
- entertainmentServiceId String?
1385
- vendor Vendor? @relation(fields: [vendorId], references: [id])
1386
- vendorId String?
1387
- exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1388
- exhibitorId String?
1389
- sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1390
- sponsorId String?
1391
- venue Venue? @relation(fields: [venueId], references: [id])
1392
- venueId String?
1393
- organization Organization? @relation(fields: [organizationId], references: [id])
1394
- organizationId String?
1395
-
1396
- @@index([businessId])
1397
- }
1
+ // This is your Prisma schema file,
2
+ // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
+
4
+ generator client {
5
+ provider = "prisma-client-js"
6
+ }
7
+
8
+ datasource db {
9
+ provider = "postgresql"
10
+ url = env("POSTGRES_PRISMA_URL") // uses connection pooling
11
+ directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
12
+ }
13
+
14
+ model Club {
15
+ id String @id @default(cuid())
16
+ name String
17
+ street String
18
+ userId String
19
+ price Int?
20
+ events BashEvent[]
21
+ members ClubMember[]
22
+ admin ClubAdmin[]
23
+ }
24
+
25
+ model ClubAdmin {
26
+ id String @id @default(cuid())
27
+ admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
28
+ userId String
29
+ club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
30
+ clubId String
31
+ role ClubAdminRole
32
+ }
33
+
34
+ model ClubMember {
35
+ id String @id @default(cuid())
36
+ member User @relation(fields: [userId], references: [id], onDelete: Cascade)
37
+ userId String
38
+ club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
39
+ clubId String
40
+ status ClubMemberStatus
41
+ statusHistory Json
42
+ price Int?
43
+ }
44
+
45
+ enum ClubAdminRole {
46
+ Owner
47
+ Admin
48
+ Staff
49
+ }
50
+
51
+ enum ClubMemberStatus {
52
+ Active
53
+ Inactive
54
+ Cancelled
55
+ Paused
56
+ Removed
57
+ }
58
+
59
+ model BashComment {
60
+ id String @id @default(cuid())
61
+ creatorId String
62
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
63
+ content String
64
+ reviewId String?
65
+ review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
66
+ bashEventId String?
67
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
68
+ parentCommentId String?
69
+ parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
70
+ replies BashComment[] @relation("CommentReplies")
71
+ }
72
+
73
+ model Competition {
74
+ id String @id @default(cuid())
75
+ name String
76
+ description String
77
+ owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
78
+ prizes Prize[]
79
+ userId String
80
+ sponser CompetitionSponsor[]
81
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
82
+ bashEventId String
83
+ numberOfPrizes Int
84
+ }
85
+
86
+ model CompetitionSponsor {
87
+ id String @id @default(cuid())
88
+ competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
89
+ sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
90
+ competitionId String
91
+ userId String
92
+ description String
93
+ paidOn String?
94
+ }
95
+
96
+ model EventTask {
97
+ id String @id @default(cuid())
98
+ creatorId String
99
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
100
+ bashEventId String
101
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
102
+ description String
103
+ assignedToId String?
104
+ assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
105
+ status TaskStatus?
106
+ bashNotificationsReferencingMe BashNotification[]
107
+ createdAt DateTime? @default(now())
108
+ }
109
+
110
+ enum TaskStatus {
111
+ Accepted
112
+ Rejected
113
+ Completed
114
+ }
115
+
116
+ model Reminder {
117
+ id String @id @default(cuid())
118
+ creatorId String
119
+ creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
120
+ remindWhoId String?
121
+ remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
122
+ remindDateTime DateTime
123
+ notificationId String
124
+ notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
125
+ }
126
+
127
+ model BashEventPromoCode {
128
+ id String @id @default(cuid())
129
+ code String
130
+ ticketTierId String
131
+ ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
132
+ stripeCouponId String?
133
+ discountAmountInCents Int?
134
+ discountAmountPercentage Int?
135
+ maxRedemptions Int?
136
+ redeemBy DateTime?
137
+ usedBy User[]
138
+
139
+ @@unique([ticketTierId, code])
140
+ }
141
+
142
+ model BashNotification {
143
+ id String @id @default(cuid())
144
+ creatorId String
145
+ creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
146
+ email String
147
+ createdDateTime DateTime @default(now())
148
+ message String
149
+ image String?
150
+ readDateTime DateTime?
151
+ taskId String?
152
+ eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
153
+ invitationId String?
154
+ invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
155
+ bashEventId String?
156
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
157
+ reminders Reminder[]
158
+ redirectUrl String?
159
+
160
+ @@unique([creatorId, email, bashEventId])
161
+ @@unique([creatorId, email, invitationId])
162
+ @@index([creatorId])
163
+ }
164
+
165
+ model Invitation {
166
+ id String @id @default(cuid())
167
+ creatorId String
168
+ creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
169
+ email String
170
+ sentToId String?
171
+ sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
172
+ bashEventId String?
173
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
174
+ image String?
175
+ phone String?
176
+ name String?
177
+ message String?
178
+ inviteDate DateTime? @default(now())
179
+ acceptedDate DateTime?
180
+ rejectedDate DateTime?
181
+ maybeDate DateTime?
182
+ tickets Ticket[] @relation("TicketsForInvitation")
183
+ bashNotifications BashNotification[]
184
+ associatedBash AssociatedBash?
185
+
186
+ @@index([email])
187
+ }
188
+
189
+ model BashEvent {
190
+ id String @id @default(cuid())
191
+ title String
192
+ creatorId String
193
+ creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
194
+ description String?
195
+ eventType String @default("Other")
196
+ startDateTime DateTime? @default(now())
197
+ endDateTime DateTime? @default(now())
198
+ ticketTiers TicketTier[]
199
+ targetAudienceId String? @unique
200
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
201
+ amountOfGuestsId String? @unique
202
+ amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
203
+ recurrence Recurrence?
204
+ vibe String?
205
+ occasion String?
206
+ dress String?
207
+ allowed String?
208
+ notAllowed String?
209
+ nonProfit Boolean?
210
+ nonProfitId String?
211
+ privacy Privacy @default(Public)
212
+ tickets Ticket[]
213
+ reviews Review[]
214
+ sponsorships SponsoredEvent[]
215
+ investments Investment[]
216
+ capacity Int?
217
+ location String?
218
+ status BashStatus @default(Draft)
219
+ tags String[]
220
+ coverPhoto String?
221
+ media Media[]
222
+ club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
223
+ clubId String?
224
+ links EventLink[]
225
+ competitions Competition[]
226
+ invitations Invitation[]
227
+ dateTimePublished DateTime?
228
+ comments BashComment[]
229
+ includedItems String[]
230
+ associatedBashesReferencingMe AssociatedBash[]
231
+ bashNotificationsReferencingMe BashNotification[]
232
+ checkouts Checkout[]
233
+ eventTasks EventTask[]
234
+ videoLink String?
235
+ subtitle String?
236
+ isFeatured Boolean?
237
+ isTrending Boolean?
238
+ }
239
+
240
+ model Checkout {
241
+ id String @id @default(cuid())
242
+ ownerId String
243
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
244
+ bashEventId String
245
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
246
+ checkoutDateTime DateTime? @default(now())
247
+ tickets Ticket[]
248
+ stripeCheckoutSessionId String? @unique
249
+ bookings Booking[]
250
+
251
+ @@index(bashEventId)
252
+ }
253
+
254
+ model TicketTier {
255
+ id String @id @default(cuid())
256
+ bashEventId String
257
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
258
+ tickets Ticket[]
259
+ waitList User[]
260
+ price Int @default(0)
261
+ title String @default("Free")
262
+ sortOrder Int?
263
+ description String?
264
+ maximumNumberOfTickets Int @default(100)
265
+ maximumTicketCount Int @default(100)
266
+ isDonationTier Boolean?
267
+ hidden Boolean?
268
+ promoCodes BashEventPromoCode[]
269
+
270
+ @@unique([bashEventId, title])
271
+ }
272
+
273
+ model Ticket {
274
+ id String @id @default(cuid())
275
+ ownerId String
276
+ owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
277
+ bashEventId String
278
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
279
+ ticketTierId String?
280
+ ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
281
+ validDate DateTime?
282
+ forUserId String?
283
+ forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
284
+ fullName String?
285
+ email String?
286
+ paidOn DateTime?
287
+ allowPromiseToPay Boolean?
288
+ status TicketStatus?
289
+ isFreeGuest Boolean?
290
+ geoFenceCheckInUnnecessary Boolean?
291
+ checkedInAt DateTime?
292
+ checkedOutAt DateTime?
293
+ invitationId String?
294
+ invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
295
+ checkoutId String?
296
+ checkout Checkout? @relation(fields: [checkoutId], references: [id])
297
+ ServiceCheckout ServiceCheckout? @relation(fields: [serviceCheckoutId], references: [id])
298
+ serviceCheckoutId String?
299
+
300
+ @@index([bashEventId])
301
+ }
302
+
303
+ enum TicketStatus {
304
+ Cancelled
305
+ Attended
306
+ Missed
307
+ }
308
+
309
+ model ServiceCheckout {
310
+ id String @id @default(cuid())
311
+ ownerId String
312
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
313
+ checkoutDateTime DateTime? @default(now())
314
+ tickets Ticket[]
315
+ stripeCheckoutSessionId String? @unique
316
+ }
317
+
318
+ model UserSubscription {
319
+ id String @id @default(cuid())
320
+ ownerId String @unique
321
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
322
+ type UserSubscriptionType
323
+ }
324
+
325
+ enum UserSubscriptionType {
326
+ Free
327
+ Premium
328
+ VIP
329
+ }
330
+
331
+ model ServiceSubscription {
332
+ id String @id @default(cuid())
333
+ ownerId String
334
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
335
+ slots Int @default(0)
336
+ stripeSubscriptionId String?
337
+ }
338
+
339
+ enum BookingStatus {
340
+ Cancelled
341
+ Completed
342
+ Missed
343
+ }
344
+
345
+ model Booking {
346
+ id String @id @default(cuid())
347
+ businessId String
348
+ business Business @relation(fields: [businessId], references: [id])
349
+ validDate DateTime?
350
+ forUserId String?
351
+ forUser User? @relation(fields: [forUserId], references: [id])
352
+ fullName String?
353
+ email String?
354
+ paidOn DateTime?
355
+ requireDeposit Boolean?
356
+ status BookingStatus?
357
+ geoFenceCheckInUnnecessary Boolean?
358
+ checkedInAt DateTime?
359
+ checkedOutAt DateTime?
360
+ checkoutId String?
361
+ checkout Checkout? @relation(fields: [checkoutId], references: [id])
362
+
363
+ @@index([businessId])
364
+ @@index([forUserId])
365
+ @@index([checkoutId])
366
+ }
367
+
368
+ model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
369
+ id String @id @default(cuid())
370
+ doNotUseVibeEnum BashEventVibeTags @default(Wild)
371
+ doNotUseDressEnum BashEventDressTags @default(Casual)
372
+ doNotUseBashEventType BashEventType @default(Other)
373
+ doNotUseDayOfWeek DayOfWeek @default(Sunday)
374
+ }
375
+
376
+ model Recurrence {
377
+ id String @id @default(cuid())
378
+ interval Int @default(1)
379
+ bashEventId String @unique
380
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
381
+ frequency RecurringFrequency @default(Never)
382
+ ends DateTime @default(now())
383
+ repeatOnDays DayOfWeek[]
384
+ repeatOnDayOfMonth Int?
385
+ repeatYearlyDate DateTime?
386
+ }
387
+
388
+ enum DayOfWeek {
389
+ Sunday
390
+ Monday
391
+ Tuesday
392
+ Wednesday
393
+ Thursday
394
+ Friday
395
+ Saturday
396
+ }
397
+
398
+ enum RecurringFrequency {
399
+ Never
400
+ Daily
401
+ Weekly
402
+ Monthly
403
+ Yearly
404
+ }
405
+
406
+ enum BashEventVibeTags {
407
+ Wild
408
+ Calm
409
+ }
410
+
411
+ enum BashEventDressTags {
412
+ Casual
413
+ BusinessCasual
414
+ Formal
415
+ }
416
+
417
+ // enum ServicesTags {
418
+ // Fast
419
+ // Reliable
420
+ // AwardRecipient
421
+ // }
422
+
423
+ enum BashEventType {
424
+ AfterParty
425
+ AnimeAndCosplayFestival
426
+ AnniversaryCelebration
427
+ ArtExhibitOpening
428
+ ArtAndCraftNight
429
+ BBQCookout
430
+ BabyShower
431
+ BachelorOrBacheloretteParty
432
+ BeachParty
433
+ Birthday
434
+ BoatPartyOrCruise
435
+ Bonfire
436
+ BookClubMeeting
437
+ BridalShower
438
+ BrunchGathering
439
+ CarShow
440
+ CarnivalAndFair
441
+ CasinoNight
442
+ CasualMixer
443
+ CharityBall
444
+ CharityFundraiser
445
+ ChristmasParty
446
+ ChurchEvent
447
+ CircusOrCarnivalParty
448
+ CocktailParty
449
+ CollegeParty_FraternityOrSorority
450
+ ComedyShowOrStandUpComedyNight
451
+ ComicConvention
452
+ Competition
453
+ Concert
454
+ CookingCompetition
455
+ CorporateEventOrOfficeParty
456
+ CostumeParty_Theme_Based
457
+ CulturalFestival
458
+ DanceParty
459
+ DesertRave
460
+ DiscoNight
461
+ EasterGathering
462
+ EngagementParty
463
+ ESportsGamingTournament
464
+ ExclusiveLuxuryRetreat
465
+ FantasyThemedParty
466
+ FashionShow
467
+ Fireside
468
+ FitnessFestival
469
+ FlashMob
470
+ Festival
471
+ FestivalFilm
472
+ FestivalFood
473
+ FundraisingEvent
474
+ GalaDinner
475
+ GameNight
476
+ GamingEvent
477
+ GardenParty
478
+ GoingAwayPartyOrFarewell
479
+ GraduationParty
480
+ HalloweenCostumeParty
481
+ HanukkahParty
482
+ HistoricalEraParty
483
+ HolidayParty
484
+ HouseParty
485
+ HousewarmingParty
486
+ KaraokeNight
487
+ KiteFlyingFestival
488
+ LiveBandPerformanceInALocalVenue
489
+ Luau
490
+ MansionParty
491
+ MardiGras
492
+ MasqueradeBall
493
+ MotorcycleRally
494
+ MovieNight
495
+ MoviePremiere
496
+ MusicFestival
497
+ NewYearsEveCelebration
498
+ OpenMicNight
499
+ OutdoorActivity
500
+ OutdoorConcert
501
+ OutdoorMovieNight_WithAProjector
502
+ Parade
503
+ Party
504
+ PoolParty
505
+ Potluck
506
+ PotluckVegan
507
+ PreParty
508
+ ProductLaunch
509
+ ProfessionalNetworkingEvent
510
+ Rave_General
511
+ RetirementCelebration
512
+ Reunion_FamilyOrSchoolOrFriends
513
+ SafariAdventureParty
514
+ SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
515
+ ScienceFictionThemedParty
516
+ SocialClubEvent
517
+ SportsTournament
518
+ SportsWatchParty
519
+ SuperheroThemedParty
520
+ SurfCompetition
521
+ ThanksgivingDinner
522
+ ThemedCostumeParty
523
+ ThemedDinnerParty
524
+ ThemedPubCrawl
525
+ Tournament
526
+ TravelAndTradeShow
527
+ TriviaNight
528
+ ValentinesDayParty
529
+ WeddingReception
530
+ WelcomeHomeParty
531
+ WellnessFestival
532
+ WineTastingEvent
533
+ Other
534
+ }
535
+
536
+ model CustomBashEventType {
537
+ id String @id @default(cuid())
538
+ key String @unique
539
+ displayName String
540
+ }
541
+
542
+ model AmountOfGuests {
543
+ id String @id @default(cuid())
544
+ bashEvent BashEvent?
545
+ venue Venue?
546
+ exhibitor Exhibitor?
547
+ eventService EventService?
548
+ entertainmentService EntertainmentService?
549
+ vendor Vendor?
550
+ sponsor Sponsor?
551
+ organization Organization?
552
+
553
+ minimum Int? @default(10)
554
+ ideal Int? @default(35)
555
+ showMinimumGuests Boolean @default(true)
556
+ showIdealGuests Boolean @default(true)
557
+ }
558
+
559
+ enum Privacy {
560
+ Public
561
+ ConnectionsOnly
562
+ InviteOnly
563
+ }
564
+
565
+ model TargetAudience {
566
+ id String @id @default(cuid())
567
+ ageRange AgeRange @default(NoPreference)
568
+ gender Gender @default(NoPreference)
569
+ occupation Occupation @default(NoPreference)
570
+ education Education @default(NoPreference)
571
+ showOnDetailPage Boolean @default(true)
572
+
573
+ bashEvent BashEvent?
574
+ business Business?
575
+ venue Venue?
576
+ vendor Vendor?
577
+ eventService EventService?
578
+ entertainmentService EntertainmentService?
579
+ exhibitor Exhibitor?
580
+ sponsor Sponsor?
581
+ organization Organization?
582
+ }
583
+
584
+ enum AgeRange {
585
+ Eighteen_24
586
+ TwentyFive_34
587
+ ThirtyFive_49
588
+ FiftyPlus
589
+ NoPreference
590
+ }
591
+
592
+ enum Occupation {
593
+ Student
594
+ Startups
595
+ SMBs
596
+ Corporations
597
+ Professional
598
+ AngelInvestors
599
+ FamilyOffice
600
+ Retired
601
+ NoPreference
602
+ }
603
+
604
+ enum Education {
605
+ HighSchool
606
+ InCollege
607
+ Bachelors
608
+ Masters
609
+ Doctorate
610
+ NoPreference
611
+ }
612
+
613
+ enum BashStatus {
614
+ Draft
615
+ PreSale
616
+ Published
617
+ }
618
+
619
+ enum ServiceStatus {
620
+ Draft
621
+ Created
622
+ }
623
+
624
+ model DocumentID {
625
+ id String @id @default(cuid())
626
+ givenName String?
627
+ familyName String?
628
+ middleName String?
629
+ suffix String?
630
+ street String?
631
+ city String?
632
+ state String?
633
+ stateName String?
634
+ zipCode String?
635
+ idNumber String?
636
+ expires String?
637
+ dob String?
638
+ issueDate String?
639
+ idType String?
640
+ userId String? @unique
641
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
642
+ }
643
+
644
+ model EventLink {
645
+ id String @id @default(cuid())
646
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
647
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
648
+ linkId String
649
+ bashEventId String
650
+ }
651
+
652
+ enum Gender {
653
+ Male
654
+ Female
655
+ Other
656
+ NoPreference
657
+ }
658
+
659
+ model Investment {
660
+ id String @id @default(cuid())
661
+ investorId String
662
+ bashEventId String
663
+ investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
664
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
665
+ amount Float
666
+ type InvestmentType
667
+ paidOn String?
668
+ }
669
+
670
+ enum InvestmentType {
671
+ Equity
672
+ Event
673
+ }
674
+
675
+ model Link {
676
+ id String @id @default(cuid())
677
+ url String
678
+ type String?
679
+ icon String?
680
+ eventLinks EventLink[]
681
+ userLinks UserLink[]
682
+ serviceLinks ServiceLink[]
683
+ volunteerServiceId String?
684
+ volunteerService VolunteerService? @relation("VolunteerServiceLinks", fields: [volunteerServiceId], references: [id])
685
+
686
+ }
687
+
688
+ model Media {
689
+ id String @id @default(cuid())
690
+ url String @unique
691
+ type MediaType
692
+ mimetype String?
693
+ bashEventsReferencingMe BashEvent[]
694
+ sponsoredEventsReferencingMe SponsoredEvent[]
695
+ businessesReferencingMe Business[]
696
+ venueReferencingMe Venue[]
697
+ EventService EventService? @relation(fields: [eventServiceId], references: [id])
698
+ eventServiceId String?
699
+ entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
700
+ entertainmentServiceId String?
701
+ vendor Vendor? @relation(fields: [vendorId], references: [id])
702
+ vendorId String?
703
+ exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
704
+ exhibitorId String?
705
+ sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
706
+ sponsorId String?
707
+ organization Organization? @relation(fields: [organizationId], references: [id])
708
+ organizationId String?
709
+ volunteerServiceId String?
710
+ volunteerService VolunteerService? @relation("VolunteerServiceMedia", fields: [volunteerServiceId], references: [id])
711
+
712
+ }
713
+
714
+ enum MediaType {
715
+ Unknown
716
+ Empty
717
+ Image
718
+ Video
719
+ }
720
+
721
+ model Prize {
722
+ id String @id @default(cuid())
723
+ prizeWorth Float?
724
+ prizeType PrizeType
725
+ name String
726
+ prizeLevel Int
727
+ description String
728
+ competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
729
+ competitionId String?
730
+ paidOn String?
731
+ winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
732
+ winnerUserId String?
733
+ }
734
+
735
+ enum PrizeType {
736
+ Monetary
737
+ Merchandise
738
+ Service
739
+ Combo
740
+ }
741
+
742
+ model Review {
743
+ id String @id @default(cuid())
744
+ rating Int
745
+ creatorId String
746
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
747
+ bashEventId String
748
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
749
+ comments BashComment[]
750
+ }
751
+
752
+ model Session {
753
+ id String @id @default(cuid())
754
+ sessionToken String @unique
755
+ userId String
756
+ expires DateTime
757
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
758
+
759
+ @@index([userId])
760
+ }
761
+
762
+ enum Sex {
763
+ Male
764
+ Female
765
+ Other
766
+ }
767
+
768
+ model SponsoredEvent {
769
+ id String @id @default(cuid())
770
+ amount Float?
771
+ paidOn String?
772
+ sponsorType SponsorType
773
+ sponsorId String
774
+ bashEventId String
775
+ sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
776
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
777
+ media Media[]
778
+ }
779
+
780
+ enum SponsorType {
781
+ Marketing
782
+ Giveaway
783
+ Awareness
784
+ Trade
785
+ CompetitionPrizeProvider
786
+ }
787
+
788
+ model User {
789
+ id String @id @default(cuid())
790
+ email String @unique
791
+ createdOn DateTime @default(now())
792
+ stripeCustomerId String? @unique
793
+ stripeAccountId String? @unique
794
+ googleCalendarAccess String?
795
+ givenName String?
796
+ familyName String?
797
+ hash String?
798
+ emailVerified DateTime?
799
+ image String?
800
+ uploadedImage String?
801
+ dob DateTime?
802
+ gender Gender?
803
+ sex Sex?
804
+ roles UserRole[] @default([User])
805
+ businesses Business[]
806
+ createdEvents BashEvent[] @relation("CreatedEvent")
807
+ ticketsISent Ticket[] @relation("TicketsISent")
808
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
809
+ reviews Review[]
810
+ sponsorships SponsoredEvent[]
811
+ investments Investment[]
812
+ sessions Session[]
813
+ eventTasks EventTask[]
814
+ clubMembers ClubMember[]
815
+ clubAdmins ClubAdmin[]
816
+ links UserLink[]
817
+ status UserStatus
818
+ competitions Competition[]
819
+ competitionSponsorships CompetitionSponsor[]
820
+ competitionPrizes Prize[]
821
+ userRatingGiven UserRatingGiven[]
822
+ userRating UserRating[]
823
+ magicLink String?
824
+ magicLinkExpiration DateTime?
825
+ magicLinkUsed DateTime?
826
+ idVerified DateTime?
827
+ street String?
828
+ city String?
829
+ state String?
830
+ zipCode String?
831
+ country String? @default("US")
832
+ phone String?
833
+ documentIDId String? @unique
834
+ documentID DocumentID?
835
+ comment BashComment[]
836
+ associatedBashes AssociatedBash[]
837
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
838
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
839
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
840
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
841
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
842
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
843
+ checkouts Checkout[]
844
+ ticketTiersWaitListsIveJoined TicketTier[]
845
+ contacts Contact[]
846
+ bashEventPromoCodesIUsed BashEventPromoCode[]
847
+ serviceCheckouts ServiceCheckout[]
848
+ bookingForMe Booking[]
849
+ userSubscription UserSubscription?
850
+ serviceSubcriptions ServiceSubscription[]
851
+ }
852
+
853
+ model Contact {
854
+ id String @id @default(cuid())
855
+ contactOwnerId String
856
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
857
+ contactEmail String?
858
+ fullName String?
859
+ phone String?
860
+ requestToConnectSent DateTime?
861
+ requestToConnectAccepted DateTime?
862
+
863
+ @@unique([contactOwnerId, contactEmail])
864
+ @@index([contactEmail])
865
+ }
866
+
867
+ model AssociatedBash {
868
+ id String @id @default(cuid())
869
+ bashEventId String
870
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
871
+ invitationId String? @unique
872
+ invitation Invitation? @relation(fields: [invitationId], references: [id])
873
+ ownerEmail String?
874
+ ownerUserId String?
875
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
876
+ isOrganizer Boolean?
877
+ isFavorite Boolean?
878
+
879
+ @@unique([ownerEmail, bashEventId])
880
+ }
881
+
882
+ model Business {
883
+ id String @id @default(cuid())
884
+ ownerId String
885
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
886
+ dateCreated DateTime @default(now())
887
+ email String
888
+ street String
889
+ city String
890
+ state String
891
+ zipCode String
892
+ country String
893
+ phone String
894
+ name String @default("New Business")
895
+ coverPhoto String?
896
+ agreedToAgreement Boolean?
897
+ media Media[]
898
+ customServiceTag String[]
899
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
900
+ serviceLinks ServiceLink[]
901
+ description String?
902
+ canContact Boolean?
903
+ // musicGenre MusicGenreType?
904
+ visibility VisibilityPreference @default(Public)
905
+ // bashesInterestedIn BashEventType[]
906
+ status ServiceStatus @default(Draft)
907
+ venues Venue[]
908
+ targetAudienceId String? @unique
909
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
910
+ volunteerService VolunteerService?
911
+ eventServices EventService[]
912
+ entertainmentServices EntertainmentService[]
913
+ vendors Vendor[]
914
+ exhibitor Exhibitor[]
915
+ sponsors Sponsor[]
916
+ organizations Organization[]
917
+ trademark String?
918
+ manager String?
919
+ dba String?
920
+ contactPerson String?
921
+ contactPhone String?
922
+ contactEmail String?
923
+ businessPhone String?
924
+ bookings Booking[]
925
+
926
+ @@index([email])
927
+ @@index([phone])
928
+ }
929
+
930
+ model VolunteerService {
931
+ id String @id @default(cuid())
932
+ businessId String @unique
933
+ business Business @relation(fields: [businessId], references: [id])
934
+ serviceRangeId String?
935
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
936
+ media Media[] @relation("VolunteerServiceMedia")
937
+ links Link[] @relation("VolunteerServiceLinks")
938
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
939
+ }
940
+
941
+ model EventService {
942
+ id String @id @default(cuid())
943
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
944
+ businessId String
945
+ eventServiceName String
946
+ eventServiceTypes EventServiceType[]
947
+ eventServiceSubType String?
948
+ email String
949
+ street String
950
+ city String
951
+ state String
952
+ zipCode String
953
+ country String
954
+ phone String
955
+ coverPhoto String?
956
+ media Media[]
957
+ visibility VisibilityPreference @default(Public)
958
+ status ServiceStatus @default(Draft)
959
+ yearsOfExperience YearsOfExperience
960
+ description String?
961
+ crowdSizeId String? @unique
962
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
963
+ additionalInfo String?
964
+ goodsOrServices String[]
965
+ menuItems String?
966
+ venueTypes String[]
967
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
968
+ mission String?
969
+ communityInvolvement String?
970
+ emergencyContact String?
971
+ contactDetails String?
972
+ rates String?
973
+ cancellationPolicy String?
974
+ refundPolicy String?
975
+ insurancePolicy String?
976
+ bashesInterestedIn BashEventType[]
977
+ links ServiceLink[]
978
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
979
+ targetAudienceId String? @unique
980
+ }
981
+
982
+ model EntertainmentService {
983
+ id String @id @default(cuid())
984
+ business Business @relation(fields: [businessId], references: [id])
985
+ businessId String
986
+ entertainmentServiceName String
987
+ entertainmentServiceTypes EntertainmentServiceType[]
988
+ entertainmentServiceSubType String?
989
+ genre MusicGenreType?
990
+ email String
991
+ street String
992
+ city String
993
+ state String
994
+ zipCode String
995
+ country String
996
+ phone String
997
+ coverPhoto String?
998
+ media Media[]
999
+ visibility VisibilityPreference @default(Public)
1000
+ status ServiceStatus @default(Draft)
1001
+ yearsOfExperience YearsOfExperience
1002
+ description String?
1003
+ crowdSizeId String? @unique
1004
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1005
+ additionalInfo String?
1006
+ goodsOrServices String[]
1007
+ venueTypes String[]
1008
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1009
+ mission String?
1010
+ communityInvolvement String?
1011
+ emergencyContact String?
1012
+ contactDetails String?
1013
+ rates String?
1014
+ cancellationPolicy String?
1015
+ refundPolicy String?
1016
+ insurancePolicy String?
1017
+ bashesInterestedIn BashEventType[]
1018
+ links ServiceLink[]
1019
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1020
+ targetAudienceId String? @unique
1021
+ }
1022
+
1023
+ model Vendor {
1024
+ id String @id @default(cuid())
1025
+ business Business @relation(fields: [businessId], references: [id])
1026
+ businessId String
1027
+ vendorName String
1028
+ email String
1029
+ street String
1030
+ city String
1031
+ state String
1032
+ zipCode String
1033
+ country String
1034
+ phone String
1035
+ coverPhoto String?
1036
+ media Media[]
1037
+ visibility VisibilityPreference @default(Public)
1038
+ status ServiceStatus @default(Draft)
1039
+ yearsOfExperience YearsOfExperience
1040
+ description String?
1041
+ crowdSizeId String? @unique
1042
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1043
+ additionalInfo String?
1044
+ goodsOrServices String[]
1045
+ menuItems String?
1046
+ venueTypes String[]
1047
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1048
+ mission String?
1049
+ communityInvolvement String?
1050
+ emergencyContact String?
1051
+ contactDetails String?
1052
+ rates String?
1053
+ cancellationPolicy String?
1054
+ refundPolicy String?
1055
+ insurancePolicy String?
1056
+ bashesInterestedIn BashEventType[]
1057
+ links ServiceLink[]
1058
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1059
+ targetAudienceId String? @unique
1060
+ }
1061
+
1062
+ model Exhibitor {
1063
+ id String @id @default(cuid())
1064
+ business Business @relation(fields: [businessId], references: [id])
1065
+ businessId String
1066
+ exhibitorName String
1067
+ email String
1068
+ street String
1069
+ city String
1070
+ state String
1071
+ zipCode String
1072
+ country String
1073
+ phone String
1074
+ coverPhoto String?
1075
+ media Media[]
1076
+ visibility VisibilityPreference @default(Public)
1077
+ yearsOfExperience YearsOfExperience
1078
+ description String?
1079
+ crowdSizeId String? @unique
1080
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1081
+ targetAudienceId String? @unique
1082
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1083
+ additionalInfo String?
1084
+ goodsOrServices String[]
1085
+ venueTypes String[]
1086
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1087
+ status ServiceStatus @default(Draft)
1088
+ mission String?
1089
+ communityInvolvement String?
1090
+ emergencyContact String?
1091
+ contactDetails String?
1092
+ rates String?
1093
+ cancellationPolicy String?
1094
+ refundPolicy String?
1095
+ insurancePolicy String?
1096
+ bashesInterestedIn BashEventType[]
1097
+ links ServiceLink[]
1098
+ }
1099
+
1100
+ model Sponsor {
1101
+ id String @id @default(cuid())
1102
+ business Business @relation(fields: [businessId], references: [id])
1103
+ businessId String
1104
+ sponsorName String
1105
+ email String
1106
+ street String
1107
+ city String
1108
+ state String
1109
+ zipCode String
1110
+ country String
1111
+ phone String
1112
+ coverPhoto String?
1113
+ media Media[]
1114
+ visibility VisibilityPreference @default(Public)
1115
+ status ServiceStatus @default(Draft)
1116
+ yearsOfExperience YearsOfExperience
1117
+ description String?
1118
+ crowdSizeId String? @unique
1119
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1120
+ additionalInfo String?
1121
+ goodsOrServices String[]
1122
+ menuItems String?
1123
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1124
+ mission String?
1125
+ communityInvolvement String?
1126
+ emergencyContact String?
1127
+ contactDetails String?
1128
+ rates String?
1129
+ cancellationPolicy String?
1130
+ refundPolicy String?
1131
+ insurancePolicy String?
1132
+ bashesInterestedIn BashEventType[]
1133
+ links ServiceLink[]
1134
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1135
+ targetAudienceId String? @unique
1136
+ }
1137
+
1138
+ model Venue {
1139
+ id String @id @default(cuid())
1140
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1141
+ businessId String
1142
+ venueName String
1143
+ email String
1144
+ street String
1145
+ city String
1146
+ state String
1147
+ zipCode String
1148
+ country String
1149
+ phone String
1150
+ coverPhoto String?
1151
+ media Media[]
1152
+ visibility VisibilityPreference @default(Public)
1153
+ status ServiceStatus @default(Draft)
1154
+ yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1155
+ description String?
1156
+ serviceRangeId String @unique
1157
+ serviceRange ServiceRange @relation(fields: [serviceRangeId], references: [id], onDelete: Cascade)
1158
+ amenities String[]
1159
+ menuItems String?
1160
+ additionalInfo String?
1161
+ features String[]
1162
+ venueTypes String[]
1163
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1164
+ // specialDateTimes Availability[] @relation("SpecialDateTimes")
1165
+ mission String?
1166
+ pitch String?
1167
+ communityInvolvement String?
1168
+ emergencyContact String?
1169
+ contactDetails String?
1170
+ rates String?
1171
+ cancellationPolicy String?
1172
+ refundPolicy String?
1173
+ safetyPolicy String?
1174
+ insurancePolicy String?
1175
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1176
+ targetAudienceId String? @unique
1177
+ bashesInterestedIn BashEventType[]
1178
+ links ServiceLink[]
1179
+ capacity Int? // Maximum number of people the venue can accommodate
1180
+ amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
1181
+ amountOfGuestsId String? @unique
1182
+ }
1183
+
1184
+ model Organization {
1185
+ id String @id @default(cuid())
1186
+ business Business? @relation(fields: [businessId], references: [id])
1187
+ businessId String?
1188
+ organizationName String
1189
+ organizationType OrganizationType[]
1190
+ email String
1191
+ street String
1192
+ city String
1193
+ state String
1194
+ zipCode String
1195
+ country String
1196
+ phone String
1197
+ coverPhoto String?
1198
+ media Media[]
1199
+ visibility VisibilityPreference @default(Public)
1200
+ status ServiceStatus @default(Draft)
1201
+ description String?
1202
+ crowdSizeId String? @unique
1203
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1204
+ additionalInfo String?
1205
+ goodsOrServices String[]
1206
+ venueTypes String[]
1207
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1208
+ mission String?
1209
+ communityInvolvement String?
1210
+ emergencyContact String?
1211
+ contactDetails String?
1212
+ rates String?
1213
+ cancellationPolicy String?
1214
+ refundPolicy String?
1215
+ insurancePolicy String?
1216
+ bashesInterestedIn BashEventType[]
1217
+ links ServiceLink[]
1218
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1219
+ targetAudienceId String? @unique
1220
+ }
1221
+
1222
+ enum EventServiceType {
1223
+ Investor
1224
+ LongTermLoan
1225
+ ShortTermLoan
1226
+ EventPlanning
1227
+ Caterer
1228
+ Cleaner
1229
+ Decorator
1230
+ InteriorDesigner
1231
+ RentalEquipmentProvider
1232
+ FoodAndBeverageProvider
1233
+ MediaCapture
1234
+ AVTechnician
1235
+ GraphicDesigner
1236
+ Influencer
1237
+ Promoter
1238
+ CelebrityAppearance
1239
+ CrewHand
1240
+ EventManager
1241
+ VirtualAssistant
1242
+ Consulting
1243
+ Transportation
1244
+ }
1245
+
1246
+ enum EntertainmentServiceType {
1247
+ Emcees
1248
+ DJs
1249
+ Bands
1250
+ SoloMusicians
1251
+ Comedy
1252
+ VarietyActs
1253
+ PerformanceArtists
1254
+ Magic
1255
+ Dancers
1256
+ Aerialists
1257
+ Impersonators
1258
+ Speakers
1259
+ Auctioneers
1260
+ }
1261
+
1262
+ enum OrganizationType {
1263
+ Church
1264
+ GreekLife
1265
+ SocialClub
1266
+ Nonprofit
1267
+ Corporation
1268
+ EducationalInstitution
1269
+ Sports
1270
+ Government
1271
+ Cultural
1272
+ Lifestyle
1273
+ Political
1274
+ Tourism
1275
+ Youth
1276
+ Senior
1277
+ Tradeshow
1278
+ Conference
1279
+ FoodAndBeverage
1280
+ TechAndStartups
1281
+ }
1282
+
1283
+ enum YearsOfExperience {
1284
+ LessThanOneYear
1285
+ OneToThreeYears
1286
+ ThreeToFiveYears
1287
+ FivePlusYears
1288
+ }
1289
+
1290
+ model ServiceRange {
1291
+ id String @id @default(cuid())
1292
+ min Int @default(0)
1293
+ max Int @default(50)
1294
+ volunteerServices VolunteerService[]
1295
+ venue Venue?
1296
+ }
1297
+
1298
+ model Availability {
1299
+ id String @id @default(cuid())
1300
+ startDateTime String
1301
+ endDateTime String
1302
+ venueId String?
1303
+ venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1304
+ eventServiceId String?
1305
+ eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1306
+ entertainmentServiceId String?
1307
+ entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1308
+ vendorId String?
1309
+ vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1310
+ exhibitorId String?
1311
+ exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1312
+ sponsorId String?
1313
+ sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1314
+ organizationId String?
1315
+ organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1316
+ volunteerServiceId String?
1317
+ volunteerService VolunteerService? @relation("AvailableDateTimes", fields: [volunteerServiceId], references: [id])
1318
+ }
1319
+
1320
+ enum VisibilityPreference {
1321
+ Public
1322
+ Private
1323
+ }
1324
+
1325
+ enum MusicGenreType {
1326
+ Classical
1327
+ Rock
1328
+ HipHop
1329
+ Country
1330
+ Pop
1331
+ EDM
1332
+ Indie
1333
+ Acoustic
1334
+ }
1335
+
1336
+ enum UserRole {
1337
+ User
1338
+ Vendor
1339
+ Sponsor
1340
+ Investor
1341
+ LoanProvider
1342
+ VenueProvider
1343
+ ServiceProvider
1344
+ SuperAdmin
1345
+ Exhibitor
1346
+ }
1347
+
1348
+ model UserLink {
1349
+ id String @id @default(cuid())
1350
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1351
+ linkId String
1352
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1353
+ userId String
1354
+ }
1355
+
1356
+ model UserRating {
1357
+ id String @id @default(cuid())
1358
+ rating Int
1359
+ comment String?
1360
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1361
+ userRatingGivenId String
1362
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1363
+ userId String
1364
+ }
1365
+
1366
+ model UserRatingGiven {
1367
+ id String @id @default(cuid())
1368
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1369
+ userId String
1370
+ UserRating UserRating[]
1371
+ }
1372
+
1373
+ enum UserStatus {
1374
+ Active
1375
+ Inactive
1376
+ Suspended
1377
+ Deactivated
1378
+ }
1379
+
1380
+ model VerificationToken {
1381
+ identifier String
1382
+ token String @unique
1383
+ expires DateTime
1384
+
1385
+ @@unique([identifier, token])
1386
+ }
1387
+
1388
+ model ServiceLink {
1389
+ id String @id @default(cuid())
1390
+ businessId String
1391
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1392
+ linkId String
1393
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1394
+ eventService EventService? @relation(fields: [eventServiceId], references: [id])
1395
+ eventServiceId String?
1396
+ entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1397
+ entertainmentServiceId String?
1398
+ vendor Vendor? @relation(fields: [vendorId], references: [id])
1399
+ vendorId String?
1400
+ exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1401
+ exhibitorId String?
1402
+ sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1403
+ sponsorId String?
1404
+ venue Venue? @relation(fields: [venueId], references: [id])
1405
+ venueId String?
1406
+ organization Organization? @relation(fields: [organizationId], references: [id])
1407
+ organizationId String?
1408
+
1409
+ @@index([businessId])
1410
+ }