@bash-app/bash-common 20.3.0 → 20.4.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,1394 +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
- 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
- }
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
+ }