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