@bash-app/bash-common 21.1.0 → 21.2.1

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