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