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