@bash-app/bash-common 18.5.0 → 19.0.1

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