@bash-app/bash-common 22.0.1 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1400 +1,1407 @@
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
- }
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
+ volunteerServiceId String?
684
+ volunteerService VolunteerService? @relation("VolunteerServiceLinks", fields: [volunteerServiceId], references: [id])
685
+
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
+ volunteerServiceId String?
710
+ volunteerService VolunteerService? @relation("VolunteerServiceMedia", fields: [volunteerServiceId], references: [id])
711
+
712
+ }
713
+
714
+ enum MediaType {
715
+ Unknown
716
+ Empty
717
+ Image
718
+ Video
719
+ }
720
+
721
+ model Prize {
722
+ id String @id @default(cuid())
723
+ prizeWorth Float?
724
+ prizeType PrizeType
725
+ name String
726
+ prizeLevel Int
727
+ description String
728
+ competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
729
+ competitionId String?
730
+ paidOn String?
731
+ winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
732
+ winnerUserId String?
733
+ }
734
+
735
+ enum PrizeType {
736
+ Monetary
737
+ Merchandise
738
+ Service
739
+ Combo
740
+ }
741
+
742
+ model Review {
743
+ id String @id @default(cuid())
744
+ rating Int
745
+ creatorId String
746
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
747
+ bashEventId String
748
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
749
+ comments BashComment[]
750
+ }
751
+
752
+ model Session {
753
+ id String @id @default(cuid())
754
+ sessionToken String @unique
755
+ userId String
756
+ expires DateTime
757
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
758
+
759
+ @@index([userId])
760
+ }
761
+
762
+ enum Sex {
763
+ Male
764
+ Female
765
+ Other
766
+ }
767
+
768
+ model SponsoredEvent {
769
+ id String @id @default(cuid())
770
+ amount Float?
771
+ paidOn String?
772
+ sponsorType SponsorType
773
+ sponsorId String
774
+ bashEventId String
775
+ sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
776
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
777
+ media Media[]
778
+ }
779
+
780
+ enum SponsorType {
781
+ Marketing
782
+ Giveaway
783
+ Awareness
784
+ Trade
785
+ CompetitionPrizeProvider
786
+ }
787
+
788
+ model User {
789
+ id String @id @default(cuid())
790
+ email String @unique
791
+ createdOn DateTime @default(now())
792
+ stripeCustomerId String? @unique
793
+ stripeAccountId String? @unique
794
+ googleCalendarAccess String?
795
+ givenName String?
796
+ familyName String?
797
+ hash String?
798
+ emailVerified DateTime?
799
+ image String?
800
+ uploadedImage String?
801
+ dob DateTime?
802
+ gender Gender?
803
+ sex Sex?
804
+ roles UserRole[] @default([User])
805
+ businesses Business[]
806
+ createdEvents BashEvent[] @relation("CreatedEvent")
807
+ ticketsISent Ticket[] @relation("TicketsISent")
808
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
809
+ reviews Review[]
810
+ sponsorships SponsoredEvent[]
811
+ investments Investment[]
812
+ sessions Session[]
813
+ eventTasks EventTask[]
814
+ clubMembers ClubMember[]
815
+ clubAdmins ClubAdmin[]
816
+ links UserLink[]
817
+ status UserStatus
818
+ competitions Competition[]
819
+ competitionSponsorships CompetitionSponsor[]
820
+ competitionPrizes Prize[]
821
+ userRatingGiven UserRatingGiven[]
822
+ userRating UserRating[]
823
+ magicLink String?
824
+ magicLinkExpiration DateTime?
825
+ magicLinkUsed DateTime?
826
+ idVerified DateTime?
827
+ street String?
828
+ city String?
829
+ state String?
830
+ zipCode String?
831
+ country String? @default("US")
832
+ phone String?
833
+ documentIDId String? @unique
834
+ documentID DocumentID?
835
+ comment BashComment[]
836
+ associatedBashes AssociatedBash[]
837
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
838
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
839
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
840
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
841
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
842
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
843
+ checkouts Checkout[]
844
+ ticketTiersWaitListsIveJoined TicketTier[]
845
+ contacts Contact[]
846
+ bashEventPromoCodesIUsed BashEventPromoCode[]
847
+ serviceCheckouts ServiceCheckout[]
848
+ bookingForMe Booking[]
849
+ userSubscription UserSubscription?
850
+ serviceSubcriptions ServiceSubscription[]
851
+ }
852
+
853
+ model Contact {
854
+ id String @id @default(cuid())
855
+ contactOwnerId String
856
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
857
+ contactEmail String?
858
+ fullName String?
859
+ phone String?
860
+ requestToConnectSent DateTime?
861
+ requestToConnectAccepted DateTime?
862
+
863
+ @@unique([contactOwnerId, contactEmail])
864
+ @@index([contactEmail])
865
+ }
866
+
867
+ model AssociatedBash {
868
+ id String @id @default(cuid())
869
+ bashEventId String
870
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
871
+ invitationId String? @unique
872
+ invitation Invitation? @relation(fields: [invitationId], references: [id])
873
+ ownerEmail String?
874
+ ownerUserId String?
875
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
876
+ isOrganizer Boolean?
877
+ isFavorite Boolean?
878
+
879
+ @@unique([ownerEmail, bashEventId])
880
+ }
881
+
882
+ model Business {
883
+ id String @id @default(cuid())
884
+ ownerId String
885
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
886
+ dateCreated DateTime @default(now())
887
+ email String
888
+ street String
889
+ city String
890
+ state String
891
+ zipCode String
892
+ country String
893
+ phone String
894
+ name String @default("New Business")
895
+ coverPhoto String?
896
+ agreedToAgreement Boolean?
897
+ media Media[]
898
+ customServiceTag String[]
899
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
900
+ serviceLinks ServiceLink[]
901
+ description String?
902
+ canContact Boolean?
903
+ // musicGenre MusicGenreType?
904
+ visibility VisibilityPreference @default(Public)
905
+ // bashesInterestedIn BashEventType[]
906
+ status ServiceStatus @default(Draft)
907
+ venues Venue[]
908
+ targetAudienceId String? @unique
909
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
910
+ volunteerService VolunteerService?
911
+ eventServices EventService[]
912
+ entertainmentServices EntertainmentService[]
913
+ vendors Vendor[]
914
+ exhibitor Exhibitor[]
915
+ sponsors Sponsor[]
916
+ organizations Organization[]
917
+ trademark String?
918
+ manager String?
919
+ dba String?
920
+ contactPerson String?
921
+ contactPhone String?
922
+ contactEmail String?
923
+ businessPhone String?
924
+ bookings Booking[]
925
+
926
+ @@index([email])
927
+ @@index([phone])
928
+ }
929
+
930
+ model VolunteerService {
931
+ id String @id @default(cuid())
932
+ businessId String @unique
933
+ business Business @relation(fields: [businessId], references: [id])
934
+ serviceRangeId String?
935
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
936
+ media Media[] @relation("VolunteerServiceMedia")
937
+ links Link[] @relation("VolunteerServiceLinks")
938
+ }
939
+
940
+ model EventService {
941
+ id String @id @default(cuid())
942
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
943
+ businessId String
944
+ eventServiceName String
945
+ eventServiceTypes EventServiceType[]
946
+ eventServiceSubType String?
947
+ email String
948
+ street String
949
+ city String
950
+ state String
951
+ zipCode String
952
+ country String
953
+ phone String
954
+ coverPhoto String?
955
+ media Media[]
956
+ visibility VisibilityPreference @default(Public)
957
+ status ServiceStatus @default(Draft)
958
+ yearsOfExperience YearsOfExperience
959
+ description String?
960
+ crowdSizeId String? @unique
961
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
962
+ additionalInfo String?
963
+ goodsOrServices String[]
964
+ menuItems String?
965
+ venueTypes String[]
966
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
967
+ mission String?
968
+ communityInvolvement String?
969
+ emergencyContact String?
970
+ contactDetails String?
971
+ rates String?
972
+ cancellationPolicy String?
973
+ refundPolicy String?
974
+ insurancePolicy String?
975
+ bashesInterestedIn BashEventType[]
976
+ links ServiceLink[]
977
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
978
+ targetAudienceId String? @unique
979
+ }
980
+
981
+ model EntertainmentService {
982
+ id String @id @default(cuid())
983
+ business Business @relation(fields: [businessId], references: [id])
984
+ businessId String
985
+ entertainmentServiceName String
986
+ entertainmentServiceTypes EntertainmentServiceType[]
987
+ entertainmentServiceSubType String?
988
+ genre MusicGenreType?
989
+ email String
990
+ street String
991
+ city String
992
+ state String
993
+ zipCode String
994
+ country String
995
+ phone String
996
+ coverPhoto String?
997
+ media Media[]
998
+ visibility VisibilityPreference @default(Public)
999
+ status ServiceStatus @default(Draft)
1000
+ yearsOfExperience YearsOfExperience
1001
+ description String?
1002
+ crowdSizeId String? @unique
1003
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1004
+ additionalInfo String?
1005
+ goodsOrServices String[]
1006
+ venueTypes String[]
1007
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1008
+ mission String?
1009
+ communityInvolvement String?
1010
+ emergencyContact String?
1011
+ contactDetails String?
1012
+ rates String?
1013
+ cancellationPolicy String?
1014
+ refundPolicy String?
1015
+ insurancePolicy String?
1016
+ bashesInterestedIn BashEventType[]
1017
+ links ServiceLink[]
1018
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1019
+ targetAudienceId String? @unique
1020
+ }
1021
+
1022
+ model Vendor {
1023
+ id String @id @default(cuid())
1024
+ business Business @relation(fields: [businessId], references: [id])
1025
+ businessId String
1026
+ vendorName String
1027
+ email String
1028
+ street String
1029
+ city String
1030
+ state String
1031
+ zipCode String
1032
+ country String
1033
+ phone String
1034
+ coverPhoto String?
1035
+ media Media[]
1036
+ visibility VisibilityPreference @default(Public)
1037
+ status ServiceStatus @default(Draft)
1038
+ yearsOfExperience YearsOfExperience
1039
+ description String?
1040
+ crowdSizeId String? @unique
1041
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1042
+ additionalInfo String?
1043
+ goodsOrServices String[]
1044
+ menuItems String?
1045
+ venueTypes String[]
1046
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1047
+ mission String?
1048
+ communityInvolvement String?
1049
+ emergencyContact String?
1050
+ contactDetails String?
1051
+ rates String?
1052
+ cancellationPolicy String?
1053
+ refundPolicy String?
1054
+ insurancePolicy String?
1055
+ bashesInterestedIn BashEventType[]
1056
+ links ServiceLink[]
1057
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1058
+ targetAudienceId String? @unique
1059
+ }
1060
+
1061
+ model Exhibitor {
1062
+ id String @id @default(cuid())
1063
+ business Business @relation(fields: [businessId], references: [id])
1064
+ businessId String
1065
+ exhibitorName String
1066
+ email String
1067
+ street String
1068
+ city String
1069
+ state String
1070
+ zipCode String
1071
+ country String
1072
+ phone String
1073
+ coverPhoto String?
1074
+ media Media[]
1075
+ visibility VisibilityPreference @default(Public)
1076
+ yearsOfExperience YearsOfExperience
1077
+ description String?
1078
+ crowdSizeId String? @unique
1079
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1080
+ targetAudienceId String? @unique
1081
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1082
+ additionalInfo String?
1083
+ goodsOrServices String[]
1084
+ venueTypes String[]
1085
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1086
+ status ServiceStatus @default(Draft)
1087
+ mission String?
1088
+ communityInvolvement String?
1089
+ emergencyContact String?
1090
+ contactDetails String?
1091
+ rates String?
1092
+ cancellationPolicy String?
1093
+ refundPolicy String?
1094
+ insurancePolicy String?
1095
+ bashesInterestedIn BashEventType[]
1096
+ links ServiceLink[]
1097
+ }
1098
+
1099
+ model Sponsor {
1100
+ id String @id @default(cuid())
1101
+ business Business @relation(fields: [businessId], references: [id])
1102
+ businessId String
1103
+ sponsorName String
1104
+ email String
1105
+ street String
1106
+ city String
1107
+ state String
1108
+ zipCode String
1109
+ country String
1110
+ phone String
1111
+ coverPhoto String?
1112
+ media Media[]
1113
+ visibility VisibilityPreference @default(Public)
1114
+ status ServiceStatus @default(Draft)
1115
+ yearsOfExperience YearsOfExperience
1116
+ description String?
1117
+ crowdSizeId String? @unique
1118
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1119
+ additionalInfo String?
1120
+ goodsOrServices String[]
1121
+ menuItems String?
1122
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1123
+ mission String?
1124
+ communityInvolvement String?
1125
+ emergencyContact String?
1126
+ contactDetails String?
1127
+ rates String?
1128
+ cancellationPolicy String?
1129
+ refundPolicy String?
1130
+ insurancePolicy String?
1131
+ bashesInterestedIn BashEventType[]
1132
+ links ServiceLink[]
1133
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1134
+ targetAudienceId String? @unique
1135
+ }
1136
+
1137
+ model Venue {
1138
+ id String @id @default(cuid())
1139
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1140
+ businessId String
1141
+ venueName String
1142
+ email String
1143
+ street String
1144
+ city String
1145
+ state String
1146
+ zipCode String
1147
+ country String
1148
+ phone String
1149
+ coverPhoto String?
1150
+ media Media[]
1151
+ visibility VisibilityPreference @default(Public)
1152
+ status ServiceStatus @default(Draft)
1153
+ yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1154
+ description String?
1155
+ serviceRangeId String @unique
1156
+ serviceRange ServiceRange @relation(fields: [serviceRangeId], references: [id], onDelete: Cascade)
1157
+ amenities String[]
1158
+ menuItems String?
1159
+ additionalInfo String?
1160
+ features String[]
1161
+ venueTypes String[]
1162
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1163
+ // specialDateTimes Availability[] @relation("SpecialDateTimes")
1164
+ mission String?
1165
+ pitch String?
1166
+ communityInvolvement String?
1167
+ emergencyContact String?
1168
+ contactDetails String?
1169
+ rates String?
1170
+ cancellationPolicy String?
1171
+ refundPolicy String?
1172
+ safetyPolicy String?
1173
+ insurancePolicy String?
1174
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1175
+ targetAudienceId String? @unique
1176
+ bashesInterestedIn BashEventType[]
1177
+ links ServiceLink[]
1178
+ capacity Int? // Maximum number of people the venue can accommodate
1179
+ amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
1180
+ amountOfGuestsId String? @unique
1181
+ }
1182
+
1183
+ model Organization {
1184
+ id String @id @default(cuid())
1185
+ business Business? @relation(fields: [businessId], references: [id])
1186
+ businessId String?
1187
+ organizationName String
1188
+ organizationType OrganizationType[]
1189
+ email String
1190
+ street String
1191
+ city String
1192
+ state String
1193
+ zipCode String
1194
+ country String
1195
+ phone String
1196
+ coverPhoto String?
1197
+ media Media[]
1198
+ visibility VisibilityPreference @default(Public)
1199
+ status ServiceStatus @default(Draft)
1200
+ description String?
1201
+ crowdSizeId String? @unique
1202
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1203
+ additionalInfo String?
1204
+ goodsOrServices String[]
1205
+ venueTypes String[]
1206
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1207
+ mission String?
1208
+ communityInvolvement String?
1209
+ emergencyContact String?
1210
+ contactDetails String?
1211
+ rates String?
1212
+ cancellationPolicy String?
1213
+ refundPolicy String?
1214
+ insurancePolicy String?
1215
+ bashesInterestedIn BashEventType[]
1216
+ links ServiceLink[]
1217
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1218
+ targetAudienceId String? @unique
1219
+ }
1220
+
1221
+ enum EventServiceType {
1222
+ Investor
1223
+ LongTermLoan
1224
+ ShortTermLoan
1225
+ EventPlanning
1226
+ Caterer
1227
+ Cleaner
1228
+ Decorator
1229
+ InteriorDesigner
1230
+ RentalEquipmentProvider
1231
+ FoodAndBeverageProvider
1232
+ MediaCapture
1233
+ AVTechnician
1234
+ GraphicDesigner
1235
+ Influencer
1236
+ Promoter
1237
+ CelebrityAppearance
1238
+ CrewHand
1239
+ EventManager
1240
+ VirtualAssistant
1241
+ Consulting
1242
+ Transportation
1243
+ }
1244
+
1245
+ enum EntertainmentServiceType {
1246
+ Emcees
1247
+ DJs
1248
+ Bands
1249
+ SoloMusicians
1250
+ Comedy
1251
+ VarietyActs
1252
+ PerformanceArtists
1253
+ Magic
1254
+ Dancers
1255
+ Aerialists
1256
+ Impersonators
1257
+ Speakers
1258
+ Auctioneers
1259
+ }
1260
+
1261
+ enum OrganizationType {
1262
+ Church
1263
+ GreekLife
1264
+ SocialClub
1265
+ Nonprofit
1266
+ Corporation
1267
+ EducationalInstitution
1268
+ Sports
1269
+ Government
1270
+ Cultural
1271
+ Lifestyle
1272
+ Political
1273
+ Tourism
1274
+ Youth
1275
+ Senior
1276
+ Tradeshow
1277
+ Conference
1278
+ FoodAndBeverage
1279
+ TechAndStartups
1280
+ }
1281
+
1282
+ enum YearsOfExperience {
1283
+ LessThanOneYear
1284
+ OneToThreeYears
1285
+ ThreeToFiveYears
1286
+ FivePlusYears
1287
+ }
1288
+
1289
+ model ServiceRange {
1290
+ id String @id @default(cuid())
1291
+ min Int @default(0)
1292
+ max Int @default(50)
1293
+ volunteerServices VolunteerService[]
1294
+ venue Venue?
1295
+ }
1296
+
1297
+ model Availability {
1298
+ id String @id @default(cuid())
1299
+ startDateTime String
1300
+ endDateTime String
1301
+ venueId String?
1302
+ venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1303
+ eventServiceId String?
1304
+ eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1305
+ entertainmentServiceId String?
1306
+ entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1307
+ vendorId String?
1308
+ vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1309
+ exhibitorId String?
1310
+ exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1311
+ sponsorId String?
1312
+ sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1313
+ organizationId String?
1314
+ organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1315
+ }
1316
+
1317
+ enum VisibilityPreference {
1318
+ Public
1319
+ Private
1320
+ }
1321
+
1322
+ enum MusicGenreType {
1323
+ Classical
1324
+ Rock
1325
+ HipHop
1326
+ Country
1327
+ Pop
1328
+ EDM
1329
+ Indie
1330
+ Acoustic
1331
+ }
1332
+
1333
+ enum UserRole {
1334
+ User
1335
+ Vendor
1336
+ Sponsor
1337
+ Investor
1338
+ LoanProvider
1339
+ VenueProvider
1340
+ ServiceProvider
1341
+ SuperAdmin
1342
+ Exhibitor
1343
+ }
1344
+
1345
+ model UserLink {
1346
+ id String @id @default(cuid())
1347
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1348
+ linkId String
1349
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1350
+ userId String
1351
+ }
1352
+
1353
+ model UserRating {
1354
+ id String @id @default(cuid())
1355
+ rating Int
1356
+ comment String?
1357
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1358
+ userRatingGivenId String
1359
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1360
+ userId String
1361
+ }
1362
+
1363
+ model UserRatingGiven {
1364
+ id String @id @default(cuid())
1365
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1366
+ userId String
1367
+ UserRating UserRating[]
1368
+ }
1369
+
1370
+ enum UserStatus {
1371
+ Active
1372
+ Inactive
1373
+ Suspended
1374
+ Deactivated
1375
+ }
1376
+
1377
+ model VerificationToken {
1378
+ identifier String
1379
+ token String @unique
1380
+ expires DateTime
1381
+
1382
+ @@unique([identifier, token])
1383
+ }
1384
+
1385
+ model ServiceLink {
1386
+ id String @id @default(cuid())
1387
+ businessId String
1388
+ business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
1389
+ linkId String
1390
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1391
+ eventService EventService? @relation(fields: [eventServiceId], references: [id])
1392
+ eventServiceId String?
1393
+ entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1394
+ entertainmentServiceId String?
1395
+ vendor Vendor? @relation(fields: [vendorId], references: [id])
1396
+ vendorId String?
1397
+ exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1398
+ exhibitorId String?
1399
+ sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1400
+ sponsorId String?
1401
+ venue Venue? @relation(fields: [venueId], references: [id])
1402
+ venueId String?
1403
+ organization Organization? @relation(fields: [organizationId], references: [id])
1404
+ organizationId String?
1405
+
1406
+ @@index([businessId])
1407
+ }