@bash-app/bash-common 22.0.0 → 22.0.2

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,1397 @@
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?
546
+ exhibitor Exhibitor?
547
+ eventService EventService?
548
+ entertainmentService EntertainmentService?
549
+ vendor Vendor?
550
+ sponsor Sponsor?
551
+ organization Organization?
552
+
553
+ minimum Int? @default(10)
554
+ ideal Int? @default(35)
555
+ showMinimumGuests Boolean @default(true)
556
+ showIdealGuests Boolean @default(true)
557
+ }
558
+
559
+ enum Privacy {
560
+ Public
561
+ ConnectionsOnly
562
+ InviteOnly
563
+ }
564
+
565
+ model TargetAudience {
566
+ id String @id @default(cuid())
567
+ ageRange AgeRange @default(NoPreference)
568
+ gender Gender @default(NoPreference)
569
+ occupation Occupation @default(NoPreference)
570
+ education Education @default(NoPreference)
571
+ showOnDetailPage Boolean @default(true)
572
+
573
+ bashEvent BashEvent?
574
+ business Business?
575
+ venue Venue?
576
+ vendor Vendor?
577
+ eventService EventService?
578
+ entertainmentService EntertainmentService?
579
+ exhibitor Exhibitor?
580
+ sponsor Sponsor?
581
+ organization Organization?
582
+ }
583
+
584
+ enum AgeRange {
585
+ Eighteen_24
586
+ TwentyFive_34
587
+ ThirtyFive_49
588
+ FiftyPlus
589
+ NoPreference
590
+ }
591
+
592
+ enum Occupation {
593
+ Student
594
+ Startups
595
+ SMBs
596
+ Corporations
597
+ Professional
598
+ AngelInvestors
599
+ FamilyOffice
600
+ Retired
601
+ NoPreference
602
+ }
603
+
604
+ enum Education {
605
+ HighSchool
606
+ InCollege
607
+ Bachelors
608
+ Masters
609
+ Doctorate
610
+ NoPreference
611
+ }
612
+
613
+ enum BashStatus {
614
+ Draft
615
+ PreSale
616
+ Published
617
+ }
618
+
619
+ enum ServiceStatus {
620
+ Draft
621
+ Created
622
+ }
623
+
624
+ model DocumentID {
625
+ id String @id @default(cuid())
626
+ givenName String?
627
+ familyName String?
628
+ middleName String?
629
+ suffix String?
630
+ street String?
631
+ city String?
632
+ state String?
633
+ stateName String?
634
+ zipCode String?
635
+ idNumber String?
636
+ expires String?
637
+ dob String?
638
+ issueDate String?
639
+ idType String?
640
+ userId String? @unique
641
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
642
+ }
643
+
644
+ model EventLink {
645
+ id String @id @default(cuid())
646
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
647
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
648
+ linkId String
649
+ bashEventId String
650
+ }
651
+
652
+ enum Gender {
653
+ Male
654
+ Female
655
+ Other
656
+ NoPreference
657
+ }
658
+
659
+ model Investment {
660
+ id String @id @default(cuid())
661
+ investorId String
662
+ bashEventId String
663
+ investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
664
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
665
+ amount Float
666
+ type InvestmentType
667
+ paidOn String?
668
+ }
669
+
670
+ enum InvestmentType {
671
+ Equity
672
+ Event
673
+ }
674
+
675
+ model Link {
676
+ id String @id @default(cuid())
677
+ url String
678
+ type String?
679
+ icon String?
680
+ eventLinks EventLink[]
681
+ userLinks UserLink[]
682
+ serviceLinks ServiceLink[]
683
+ }
684
+
685
+ model Media {
686
+ id String @id @default(cuid())
687
+ url String @unique
688
+ type MediaType
689
+ mimetype String?
690
+ bashEventsReferencingMe BashEvent[]
691
+ sponsoredEventsReferencingMe SponsoredEvent[]
692
+ businessesReferencingMe Business[]
693
+ venueReferencingMe Venue[]
694
+ EventService EventService? @relation(fields: [eventServiceId], references: [id])
695
+ eventServiceId String?
696
+ entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
697
+ entertainmentServiceId String?
698
+ vendor Vendor? @relation(fields: [vendorId], references: [id])
699
+ vendorId String?
700
+ exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
701
+ exhibitorId String?
702
+ sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
703
+ sponsorId String?
704
+ organization Organization? @relation(fields: [organizationId], references: [id])
705
+ organizationId String?
706
+ }
707
+
708
+ enum MediaType {
709
+ Unknown
710
+ Empty
711
+ Image
712
+ Video
713
+ }
714
+
715
+ model Prize {
716
+ id String @id @default(cuid())
717
+ prizeWorth Float?
718
+ prizeType PrizeType
719
+ name String
720
+ prizeLevel Int
721
+ description String
722
+ competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
723
+ competitionId String?
724
+ paidOn String?
725
+ winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
726
+ winnerUserId String?
727
+ }
728
+
729
+ enum PrizeType {
730
+ Monetary
731
+ Merchandise
732
+ Service
733
+ Combo
734
+ }
735
+
736
+ model Review {
737
+ id String @id @default(cuid())
738
+ rating Int
739
+ creatorId String
740
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
741
+ bashEventId String
742
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
743
+ comments BashComment[]
744
+ }
745
+
746
+ model Session {
747
+ id String @id @default(cuid())
748
+ sessionToken String @unique
749
+ userId String
750
+ expires DateTime
751
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
752
+
753
+ @@index([userId])
754
+ }
755
+
756
+ enum Sex {
757
+ Male
758
+ Female
759
+ Other
760
+ }
761
+
762
+ model SponsoredEvent {
763
+ id String @id @default(cuid())
764
+ amount Float?
765
+ paidOn String?
766
+ sponsorType SponsorType
767
+ sponsorId String
768
+ bashEventId String
769
+ sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
770
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
771
+ media Media[]
772
+ }
773
+
774
+ enum SponsorType {
775
+ Marketing
776
+ Giveaway
777
+ Awareness
778
+ Trade
779
+ CompetitionPrizeProvider
780
+ }
781
+
782
+ model User {
783
+ id String @id @default(cuid())
784
+ email String @unique
785
+ createdOn DateTime @default(now())
786
+ stripeCustomerId String? @unique
787
+ stripeAccountId String? @unique
788
+ googleCalendarAccess String?
789
+ givenName String?
790
+ familyName String?
791
+ hash String?
792
+ emailVerified DateTime?
793
+ image String?
794
+ uploadedImage String?
795
+ dob DateTime?
796
+ gender Gender?
797
+ sex Sex?
798
+ roles UserRole[] @default([User])
799
+ businesses Business[]
800
+ createdEvents BashEvent[] @relation("CreatedEvent")
801
+ ticketsISent Ticket[] @relation("TicketsISent")
802
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
803
+ reviews Review[]
804
+ sponsorships SponsoredEvent[]
805
+ investments Investment[]
806
+ sessions Session[]
807
+ eventTasks EventTask[]
808
+ clubMembers ClubMember[]
809
+ clubAdmins ClubAdmin[]
810
+ links UserLink[]
811
+ status UserStatus
812
+ competitions Competition[]
813
+ competitionSponsorships CompetitionSponsor[]
814
+ competitionPrizes Prize[]
815
+ userRatingGiven UserRatingGiven[]
816
+ userRating UserRating[]
817
+ magicLink String?
818
+ magicLinkExpiration DateTime?
819
+ magicLinkUsed DateTime?
820
+ idVerified DateTime?
821
+ street String?
822
+ city String?
823
+ state String?
824
+ zipCode String?
825
+ country String? @default("US")
826
+ phone String?
827
+ documentIDId String? @unique
828
+ documentID DocumentID?
829
+ comment BashComment[]
830
+ associatedBashes AssociatedBash[]
831
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
832
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
833
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
834
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
835
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
836
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
837
+ checkouts Checkout[]
838
+ ticketTiersWaitListsIveJoined TicketTier[]
839
+ contacts Contact[]
840
+ bashEventPromoCodesIUsed BashEventPromoCode[]
841
+ serviceCheckouts ServiceCheckout[]
842
+ bookingForMe Booking[]
843
+ userSubscription UserSubscription?
844
+ serviceSubcriptions ServiceSubscription[]
845
+ }
846
+
847
+ model Contact {
848
+ id String @id @default(cuid())
849
+ contactOwnerId String
850
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
851
+ contactEmail String?
852
+ fullName String?
853
+ phone String?
854
+ requestToConnectSent DateTime?
855
+ requestToConnectAccepted DateTime?
856
+
857
+ @@unique([contactOwnerId, contactEmail])
858
+ @@index([contactEmail])
859
+ }
860
+
861
+ model AssociatedBash {
862
+ id String @id @default(cuid())
863
+ bashEventId String
864
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
865
+ invitationId String? @unique
866
+ invitation Invitation? @relation(fields: [invitationId], references: [id])
867
+ ownerEmail String?
868
+ ownerUserId String?
869
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
870
+ isOrganizer Boolean?
871
+ isFavorite Boolean?
872
+
873
+ @@unique([ownerEmail, bashEventId])
874
+ }
875
+
876
+ model Business {
877
+ id String @id @default(cuid())
878
+ ownerId String
879
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
880
+ dateCreated DateTime @default(now())
881
+ email String
882
+ street String
883
+ city String
884
+ state String
885
+ zipCode String
886
+ country String
887
+ phone String
888
+ name String @default("New Business")
889
+ coverPhoto String?
890
+ agreedToAgreement Boolean?
891
+ media Media[]
892
+ customServiceTag String[]
893
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
894
+ serviceLinks ServiceLink[]
895
+ description String?
896
+ canContact Boolean?
897
+ // musicGenre MusicGenreType?
898
+ visibility VisibilityPreference @default(Public)
899
+ // bashesInterestedIn BashEventType[]
900
+ status ServiceStatus @default(Draft)
901
+ venues Venue[]
902
+ targetAudienceId String? @unique
903
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
904
+ volunteerService VolunteerService?
905
+ eventServices EventService[]
906
+ entertainmentServices EntertainmentService[]
907
+ vendors Vendor[]
908
+ exhibitor Exhibitor[]
909
+ sponsors Sponsor[]
910
+ organizations Organization[]
911
+ trademark String?
912
+ manager String?
913
+ dba String?
914
+ contactPerson String?
915
+ contactPhone String?
916
+ contactEmail String?
917
+ businessPhone String?
918
+ bookings Booking[]
919
+
920
+ @@index([email])
921
+ @@index([phone])
922
+ }
923
+
924
+ model VolunteerService {
925
+ id String @id @default(cuid())
926
+ businessId String @unique
927
+ business Business @relation(fields: [businessId], references: [id])
928
+ }
929
+
930
+ model EventService {
931
+ id String @id @default(cuid())
932
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
933
+ businessId String
934
+ eventServiceName String
935
+ eventServiceTypes EventServiceType[]
936
+ eventServiceSubType String?
937
+ email String
938
+ street String
939
+ city String
940
+ state String
941
+ zipCode String
942
+ country String
943
+ phone String
944
+ coverPhoto String?
945
+ media Media[]
946
+ visibility VisibilityPreference @default(Public)
947
+ status ServiceStatus @default(Draft)
948
+ yearsOfExperience YearsOfExperience
949
+ description String?
950
+ crowdSizeId String? @unique
951
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
952
+ additionalInfo String?
953
+ goodsOrServices String[]
954
+ menuItems String?
955
+ venueTypes String[]
956
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
957
+ mission String?
958
+ communityInvolvement String?
959
+ emergencyContact String?
960
+ contactDetails String?
961
+ rates String?
962
+ cancellationPolicy String?
963
+ refundPolicy String?
964
+ insurancePolicy String?
965
+ bashesInterestedIn BashEventType[]
966
+ links ServiceLink[]
967
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
968
+ targetAudienceId String? @unique
969
+ }
970
+
971
+ model EntertainmentService {
972
+ id String @id @default(cuid())
973
+ business Business @relation(fields: [businessId], references: [id])
974
+ businessId String
975
+ entertainmentServiceName String
976
+ entertainmentServiceTypes EntertainmentServiceType[]
977
+ entertainmentServiceSubType String?
978
+ genre MusicGenreType?
979
+ email String
980
+ street String
981
+ city String
982
+ state String
983
+ zipCode String
984
+ country String
985
+ phone String
986
+ coverPhoto String?
987
+ media Media[]
988
+ visibility VisibilityPreference @default(Public)
989
+ status ServiceStatus @default(Draft)
990
+ yearsOfExperience YearsOfExperience
991
+ description String?
992
+ crowdSizeId String? @unique
993
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
994
+ additionalInfo String?
995
+ goodsOrServices String[]
996
+ venueTypes String[]
997
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
998
+ mission String?
999
+ communityInvolvement String?
1000
+ emergencyContact String?
1001
+ contactDetails String?
1002
+ rates String?
1003
+ cancellationPolicy String?
1004
+ refundPolicy String?
1005
+ insurancePolicy String?
1006
+ bashesInterestedIn BashEventType[]
1007
+ links ServiceLink[]
1008
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1009
+ targetAudienceId String? @unique
1010
+ }
1011
+
1012
+ model Vendor {
1013
+ id String @id @default(cuid())
1014
+ business Business @relation(fields: [businessId], references: [id])
1015
+ businessId String
1016
+ vendorName String
1017
+ email String
1018
+ street String
1019
+ city String
1020
+ state String
1021
+ zipCode String
1022
+ country String
1023
+ phone String
1024
+ coverPhoto String?
1025
+ media Media[]
1026
+ visibility VisibilityPreference @default(Public)
1027
+ status ServiceStatus @default(Draft)
1028
+ yearsOfExperience YearsOfExperience
1029
+ description String?
1030
+ crowdSizeId String? @unique
1031
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1032
+ additionalInfo String?
1033
+ goodsOrServices String[]
1034
+ menuItems String?
1035
+ venueTypes String[]
1036
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1037
+ mission String?
1038
+ communityInvolvement String?
1039
+ emergencyContact String?
1040
+ contactDetails String?
1041
+ rates String?
1042
+ cancellationPolicy String?
1043
+ refundPolicy String?
1044
+ insurancePolicy String?
1045
+ bashesInterestedIn BashEventType[]
1046
+ links ServiceLink[]
1047
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1048
+ targetAudienceId String? @unique
1049
+ }
1050
+
1051
+ model Exhibitor {
1052
+ id String @id @default(cuid())
1053
+ business Business @relation(fields: [businessId], references: [id])
1054
+ businessId String
1055
+ exhibitorName String
1056
+ email String
1057
+ street String
1058
+ city String
1059
+ state String
1060
+ zipCode String
1061
+ country String
1062
+ phone String
1063
+ coverPhoto String?
1064
+ media Media[]
1065
+ visibility VisibilityPreference @default(Public)
1066
+ yearsOfExperience YearsOfExperience
1067
+ description String?
1068
+ crowdSizeId String? @unique
1069
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1070
+ targetAudienceId String? @unique
1071
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1072
+ additionalInfo String?
1073
+ goodsOrServices String[]
1074
+ venueTypes String[]
1075
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1076
+ status ServiceStatus @default(Draft)
1077
+ mission String?
1078
+ communityInvolvement String?
1079
+ emergencyContact String?
1080
+ contactDetails String?
1081
+ rates String?
1082
+ cancellationPolicy String?
1083
+ refundPolicy String?
1084
+ insurancePolicy String?
1085
+ bashesInterestedIn BashEventType[]
1086
+ links ServiceLink[]
1087
+ }
1088
+
1089
+ model Sponsor {
1090
+ id String @id @default(cuid())
1091
+ business Business @relation(fields: [businessId], references: [id])
1092
+ businessId String
1093
+ sponsorName String
1094
+ email String
1095
+ street String
1096
+ city String
1097
+ state String
1098
+ zipCode String
1099
+ country String
1100
+ phone String
1101
+ coverPhoto String?
1102
+ media Media[]
1103
+ visibility VisibilityPreference @default(Public)
1104
+ status ServiceStatus @default(Draft)
1105
+ yearsOfExperience YearsOfExperience
1106
+ description String?
1107
+ crowdSizeId String? @unique
1108
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1109
+ additionalInfo String?
1110
+ goodsOrServices String[]
1111
+ menuItems String?
1112
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1113
+ mission String?
1114
+ communityInvolvement String?
1115
+ emergencyContact String?
1116
+ contactDetails String?
1117
+ rates String?
1118
+ cancellationPolicy String?
1119
+ refundPolicy String?
1120
+ insurancePolicy String?
1121
+ bashesInterestedIn BashEventType[]
1122
+ links ServiceLink[]
1123
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1124
+ targetAudienceId String? @unique
1125
+ }
1126
+
1127
+ model Venue {
1128
+ id String @id @default(cuid())
1129
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1130
+ businessId String
1131
+ venueName String
1132
+ email String
1133
+ street String
1134
+ city String
1135
+ state String
1136
+ zipCode String
1137
+ country String
1138
+ phone String
1139
+ coverPhoto String?
1140
+ media Media[]
1141
+ visibility VisibilityPreference @default(Public)
1142
+ status ServiceStatus @default(Draft)
1143
+ yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1144
+ description String?
1145
+ serviceRangeId String @unique
1146
+ serviceRange ServiceRange @relation(fields: [serviceRangeId], references: [id], onDelete: Cascade)
1147
+ amenities String[]
1148
+ menuItems String?
1149
+ additionalInfo String?
1150
+ features String[]
1151
+ venueTypes String[]
1152
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1153
+ // specialDateTimes Availability[] @relation("SpecialDateTimes")
1154
+ mission String?
1155
+ pitch String?
1156
+ communityInvolvement String?
1157
+ emergencyContact String?
1158
+ contactDetails String?
1159
+ rates String?
1160
+ cancellationPolicy String?
1161
+ refundPolicy String?
1162
+ safetyPolicy String?
1163
+ insurancePolicy String?
1164
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1165
+ targetAudienceId String? @unique
1166
+ bashesInterestedIn BashEventType[]
1167
+ links ServiceLink[]
1168
+ capacity Int? // Maximum number of people the venue can accommodate
1169
+ amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
1170
+ amountOfGuestsId String? @unique
1171
+ }
1172
+
1173
+ model Organization {
1174
+ id String @id @default(cuid())
1175
+ business Business? @relation(fields: [businessId], references: [id])
1176
+ businessId String?
1177
+ organizationName String
1178
+ organizationType OrganizationType[]
1179
+ email String
1180
+ street String
1181
+ city String
1182
+ state String
1183
+ zipCode String
1184
+ country String
1185
+ phone String
1186
+ coverPhoto String?
1187
+ media Media[]
1188
+ visibility VisibilityPreference @default(Public)
1189
+ status ServiceStatus @default(Draft)
1190
+ description String?
1191
+ crowdSizeId String? @unique
1192
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1193
+ additionalInfo String?
1194
+ goodsOrServices String[]
1195
+ venueTypes String[]
1196
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1197
+ mission String?
1198
+ communityInvolvement String?
1199
+ emergencyContact String?
1200
+ contactDetails String?
1201
+ rates String?
1202
+ cancellationPolicy String?
1203
+ refundPolicy String?
1204
+ insurancePolicy String?
1205
+ bashesInterestedIn BashEventType[]
1206
+ links ServiceLink[]
1207
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1208
+ targetAudienceId String? @unique
1209
+ }
1210
+
1211
+ enum EventServiceType {
1212
+ Investor
1213
+ LongTermLoan
1214
+ ShortTermLoan
1215
+ EventPlanning
1216
+ Caterer
1217
+ Cleaner
1218
+ Decorator
1219
+ InteriorDesigner
1220
+ RentalEquipmentProvider
1221
+ FoodAndBeverageProvider
1222
+ MediaCapture
1223
+ AVTechnician
1224
+ GraphicDesigner
1225
+ Influencer
1226
+ Promoter
1227
+ CelebrityAppearance
1228
+ CrewHand
1229
+ EventManager
1230
+ VirtualAssistant
1231
+ Consulting
1232
+ Transportation
1233
+ }
1234
+
1235
+ enum EntertainmentServiceType {
1236
+ Emcees
1237
+ DJs
1238
+ Bands
1239
+ SoloMusicians
1240
+ Comedy
1241
+ VarietyActs
1242
+ PerformanceArtists
1243
+ Magic
1244
+ Dancers
1245
+ Aerialists
1246
+ Impersonators
1247
+ Speakers
1248
+ Auctioneers
1249
+ }
1250
+
1251
+ enum OrganizationType {
1252
+ Church
1253
+ GreekLife
1254
+ SocialClub
1255
+ Nonprofit
1256
+ Corporation
1257
+ EducationalInstitution
1258
+ Sports
1259
+ Government
1260
+ Cultural
1261
+ Lifestyle
1262
+ Political
1263
+ Tourism
1264
+ Youth
1265
+ Senior
1266
+ Tradeshow
1267
+ Conference
1268
+ FoodAndBeverage
1269
+ TechAndStartups
1270
+ }
1271
+
1272
+ enum YearsOfExperience {
1273
+ LessThanOneYear
1274
+ OneToThreeYears
1275
+ ThreeToFiveYears
1276
+ FivePlusYears
1277
+ }
1278
+
1279
+ model ServiceRange {
1280
+ id String @id @default(cuid())
1281
+ min Int @default(0)
1282
+ max Int @default(50)
1283
+
1284
+ venue Venue?
1285
+ }
1286
+
1287
+ model Availability {
1288
+ id String @id @default(cuid())
1289
+ startDateTime String
1290
+ endDateTime String
1291
+ venueId String?
1292
+ venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1293
+ eventServiceId String?
1294
+ eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1295
+ entertainmentServiceId String?
1296
+ entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1297
+ vendorId String?
1298
+ vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1299
+ exhibitorId String?
1300
+ exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1301
+ sponsorId String?
1302
+ sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1303
+ organizationId String?
1304
+ organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1305
+ }
1306
+
1307
+ enum VisibilityPreference {
1308
+ Public
1309
+ Private
1310
+ }
1311
+
1312
+ enum MusicGenreType {
1313
+ Classical
1314
+ Rock
1315
+ HipHop
1316
+ Country
1317
+ Pop
1318
+ EDM
1319
+ Indie
1320
+ Acoustic
1321
+ }
1322
+
1323
+ enum UserRole {
1324
+ User
1325
+ Vendor
1326
+ Sponsor
1327
+ Investor
1328
+ LoanProvider
1329
+ VenueProvider
1330
+ ServiceProvider
1331
+ SuperAdmin
1332
+ Exhibitor
1333
+ }
1334
+
1335
+ model UserLink {
1336
+ id String @id @default(cuid())
1337
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1338
+ linkId String
1339
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1340
+ userId String
1341
+ }
1342
+
1343
+ model UserRating {
1344
+ id String @id @default(cuid())
1345
+ rating Int
1346
+ comment String?
1347
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1348
+ userRatingGivenId String
1349
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1350
+ userId String
1351
+ }
1352
+
1353
+ model UserRatingGiven {
1354
+ id String @id @default(cuid())
1355
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1356
+ userId String
1357
+ UserRating UserRating[]
1358
+ }
1359
+
1360
+ enum UserStatus {
1361
+ Active
1362
+ Inactive
1363
+ Suspended
1364
+ Deactivated
1365
+ }
1366
+
1367
+ model VerificationToken {
1368
+ identifier String
1369
+ token String @unique
1370
+ expires DateTime
1371
+
1372
+ @@unique([identifier, token])
1373
+ }
1374
+
1375
+ model ServiceLink {
1376
+ id String @id @default(cuid())
1377
+ businessId String
1378
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1379
+ linkId String
1380
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1381
+ eventService EventService? @relation(fields: [eventServiceId], references: [id])
1382
+ eventServiceId String?
1383
+ entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1384
+ entertainmentServiceId String?
1385
+ vendor Vendor? @relation(fields: [vendorId], references: [id])
1386
+ vendorId String?
1387
+ exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1388
+ exhibitorId String?
1389
+ sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1390
+ sponsorId String?
1391
+ venue Venue? @relation(fields: [venueId], references: [id])
1392
+ venueId String?
1393
+ organization Organization? @relation(fields: [organizationId], references: [id])
1394
+ organizationId String?
1395
+
1396
+ @@index([businessId])
1397
+ }