@bash-app/bash-common 18.3.2 → 18.3.4

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,1355 +1,1352 @@
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
- email String
831
- streetAddress String
832
- city String
833
- state String
834
- postalCode String
835
- country String
836
- phone String
837
- title String
838
- coverPhoto String?
839
- agreedToAgreement Boolean?
840
- media Media[]
841
- serviceTypes ServiceType[]
842
- customServiceTag String[]
843
- yearsOfExperince YearsOfExperience @default(LessThanOneYear)
844
- serviceLinks ServiceLink[]
845
- description String?
846
- canContact Boolean?
847
- // musicGenre MusicGenreType?
848
- visibility VisibilityPreference @default(Public)
849
- // bashesInterestedIn BashEventType[]
850
- status ServiceStatus @default(Draft)
851
- venues Venue[]
852
- serviceRangeId String @unique
853
- serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
854
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
855
- targetAudienceId String?
856
- eventService EventService[]
857
- entertainmentService EntertainmentService[]
858
- vendor Vendor[]
859
- exhibitor Exhibitor[]
860
- sponsor Sponsor[]
861
- organization Organization[]
862
-
863
- @@index([email])
864
- @@index([phone])
865
- }
866
-
867
- model EventService {
868
- id String @id @default(cuid())
869
- service Service? @relation(fields: [serviceId], references: [id])
870
- serviceId String?
871
- eventServiceName String
872
- eventServiceTypes EventServiceType[]
873
- eventServiceSubType String?
874
- email String
875
- streetAddress String
876
- city String
877
- state String
878
- postalCode String
879
- country String
880
- phone String
881
- coverPhoto String?
882
- media Media[]
883
- visibility VisibilityPreference @default(Public)
884
- status ServiceStatus @default(Draft)
885
- yearsOfExperience YearsOfExperience
886
- description String?
887
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
888
- additionalInfo String?
889
- goodsOrServices String[]
890
- menuItems String?
891
- venueTypes String[]
892
- availableDateTimes Availability[] @relation("AvailableDateTimes")
893
- mission String?
894
- communityInvolvement String?
895
- emergencyContact String?
896
- contactDetails String?
897
- rates String?
898
- cancellationPolicy String?
899
- refundPolicy String?
900
- insurancePolicy String?
901
- bashesInterestedIn BashEventType[]
902
- links ServiceLink[]
903
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
904
- targetAudienceId String?
905
- crowdSizeId String?
906
- User User? @relation(fields: [userId], references: [id])
907
- userId String?
908
- }
909
-
910
- model EntertainmentService {
911
- id String @id @default(cuid())
912
- service Service? @relation(fields: [serviceId], references: [id])
913
- serviceId String?
914
- entertainmentServiceName String
915
- entertainmentServiceTypes EntertainmentServiceType[]
916
- entertainmentServiceSubType String?
917
- genre MusicGenreType?
918
- email String
919
- streetAddress String
920
- city String
921
- state String
922
- postalCode String
923
- country String
924
- phone String
925
- coverPhoto String?
926
- media Media[]
927
- visibility VisibilityPreference @default(Public)
928
- status ServiceStatus @default(Draft)
929
- yearsOfExperience YearsOfExperience
930
- description String?
931
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
932
- additionalInfo String?
933
- goodsOrServices String[]
934
- venueTypes String[]
935
- availableDateTimes Availability[] @relation("AvailableDateTimes")
936
- mission String?
937
- communityInvolvement String?
938
- emergencyContact String?
939
- contactDetails String?
940
- rates String?
941
- cancellationPolicy String?
942
- refundPolicy String?
943
- insurancePolicy String?
944
- bashesInterestedIn BashEventType[]
945
- links ServiceLink[]
946
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
947
- targetAudienceId String?
948
- crowdSizeId String?
949
- User User? @relation(fields: [userId], references: [id])
950
- userId String?
951
- }
952
-
953
- model Vendor {
954
- id String @id @default(cuid())
955
- service Service? @relation(fields: [serviceId], references: [id])
956
- serviceId String?
957
- vendorName String
958
- email String
959
- streetAddress String
960
- city String
961
- state String
962
- postalCode String
963
- country String
964
- phone String
965
- coverPhoto String?
966
- media Media[]
967
- visibility VisibilityPreference @default(Public)
968
- status ServiceStatus @default(Draft)
969
- yearsOfExperience YearsOfExperience
970
- description String?
971
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
972
- additionalInfo String?
973
- goodsOrServices String[]
974
- menuItems String?
975
- venueTypes String[]
976
- availableDateTimes Availability[] @relation("AvailableDateTimes")
977
- mission String?
978
- communityInvolvement String?
979
- emergencyContact String?
980
- contactDetails String?
981
- rates String?
982
- cancellationPolicy String?
983
- refundPolicy String?
984
- insurancePolicy String?
985
- bashesInterestedIn BashEventType[]
986
- links ServiceLink[]
987
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
988
- targetAudienceId String?
989
- User User? @relation(fields: [userId], references: [id])
990
- userId String?
991
- crowdSizeId String?
992
- }
993
-
994
- model Exhibitor {
995
- id String @id @default(cuid())
996
- service Service? @relation(fields: [serviceId], references: [id])
997
- serviceId String?
998
- exhibitorName String
999
- email String
1000
- streetAddress String
1001
- city String
1002
- state String
1003
- postalCode String
1004
- country String
1005
- phone String
1006
- coverPhoto String?
1007
- media Media[]
1008
- visibility VisibilityPreference @default(Public)
1009
- yearsOfExperience YearsOfExperience
1010
- description String?
1011
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1012
- additionalInfo String?
1013
- goodsOrServices String[]
1014
- venueTypes String[]
1015
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1016
- status ServiceStatus @default(Draft)
1017
- mission String?
1018
- communityInvolvement String?
1019
- emergencyContact String?
1020
- contactDetails String?
1021
- rates String?
1022
- cancellationPolicy String?
1023
- refundPolicy String?
1024
- insurancePolicy String?
1025
- bashesInterestedIn BashEventType[]
1026
- links ServiceLink[]
1027
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1028
- targetAudienceId String?
1029
- User User? @relation(fields: [userId], references: [id])
1030
- userId String?
1031
- crowdSizeId String?
1032
- }
1033
-
1034
- model Sponsor {
1035
- id String @id @default(cuid())
1036
- service Service? @relation(fields: [serviceId], references: [id])
1037
- serviceId String?
1038
- sponsorName String
1039
- email String
1040
- streetAddress String
1041
- city String
1042
- state String
1043
- postalCode String
1044
- country String
1045
- phone String
1046
- coverPhoto String?
1047
- media Media[]
1048
- visibility VisibilityPreference @default(Public)
1049
- status ServiceStatus @default(Draft)
1050
- yearsOfExperience YearsOfExperience
1051
- description String?
1052
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1053
- additionalInfo String?
1054
- goodsOrServices String[]
1055
- menuItems String?
1056
- venueTypes String[]
1057
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1058
- mission String?
1059
- communityInvolvement String?
1060
- emergencyContact String?
1061
- contactDetails String?
1062
- rates String?
1063
- cancellationPolicy String?
1064
- refundPolicy String?
1065
- insurancePolicy String?
1066
- bashesInterestedIn BashEventType[]
1067
- links ServiceLink[]
1068
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1069
- targetAudienceId String?
1070
- crowdSizeId String?
1071
- User User? @relation(fields: [userId], references: [id])
1072
- userId String?
1073
- }
1074
-
1075
- model Venue {
1076
- id String @id @default(cuid())
1077
- service Service? @relation(fields: [serviceId], references: [id])
1078
- serviceId String?
1079
- venueName String
1080
- email String
1081
- streetAddress String
1082
- city String
1083
- state String
1084
- postalCode String
1085
- country String
1086
- phone String
1087
- coverPhoto String?
1088
- media Media[]
1089
- visibility VisibilityPreference @default(Public)
1090
- status ServiceStatus @default(Draft)
1091
- yearsInBusiness YearsOfExperience
1092
- description String?
1093
- capacity AmountOfGuests?
1094
- amenities String[]
1095
- menuItems String?
1096
- additionalInfo String?
1097
- features String[]
1098
- venueTypes String[]
1099
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1100
- // specialDateTimes Availability[] @relation("SpecialDateTimes")
1101
- mission String?
1102
- pitch String?
1103
- communityInvolvement String?
1104
- emergencyContact String?
1105
- contactDetails String?
1106
- rates String?
1107
- cancellationPolicy String?
1108
- refundPolicy String?
1109
- safetyPolicy String?
1110
- insurancePolicy String?
1111
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1112
- targetAudienceId String?
1113
- bashesInterestedIn BashEventType[]
1114
- links ServiceLink[]
1115
- User User? @relation(fields: [userId], references: [id])
1116
- userId String?
1117
- }
1118
-
1119
- model Organization {
1120
- id String @id @default(cuid())
1121
- service Service? @relation(fields: [serviceId], references: [id])
1122
- serviceId String?
1123
- organizationName String
1124
- organizationType OrganizationType[]
1125
- email String
1126
- streetAddress String
1127
- city String
1128
- state String
1129
- postalCode String
1130
- country String
1131
- phone String
1132
- coverPhoto String?
1133
- media Media[]
1134
- visibility VisibilityPreference @default(Public)
1135
- status ServiceStatus @default(Draft)
1136
- description String?
1137
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1138
- additionalInfo String?
1139
- goodsOrServices String[]
1140
- venueTypes String[]
1141
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1142
- mission String?
1143
- communityInvolvement String?
1144
- emergencyContact String?
1145
- contactDetails String?
1146
- rates String?
1147
- cancellationPolicy String?
1148
- refundPolicy String?
1149
- insurancePolicy String?
1150
- bashesInterestedIn BashEventType[]
1151
- links ServiceLink[]
1152
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1153
- targetAudienceId String?
1154
- crowdSizeId String?
1155
- User User? @relation(fields: [userId], references: [id])
1156
- userId String?
1157
- }
1158
-
1159
- enum EventServiceType {
1160
- Investor
1161
- LongTermLoan
1162
- ShortTermLoan
1163
- EventPlanning
1164
- Caterer
1165
- Cleaner
1166
- Decorator
1167
- InteriorDesigner
1168
- RentalEquipmentProvider
1169
- FoodAndBeverageProvider
1170
- MediaCapture
1171
- AVTechnician
1172
- GraphicDesigner
1173
- Influencer
1174
- Promoter
1175
- CelebrityAppearance
1176
- CrewHand
1177
- EventManager
1178
- VirtualAssistant
1179
- Consulting
1180
- Transportation
1181
- }
1182
-
1183
- enum EntertainmentServiceType {
1184
- Emcees
1185
- DJs
1186
- Bands
1187
- SoloMusicians
1188
- Comedy
1189
- VarietyActs
1190
- PerformanceArtists
1191
- Magic
1192
- Dancers
1193
- Aerialists
1194
- Impersonators
1195
- Speakers
1196
- Auctioneers
1197
- }
1198
-
1199
- enum OrganizationType {
1200
- Church
1201
- GreekLife
1202
- SocialClub
1203
- Nonprofit
1204
- Corporation
1205
- EducationalInstitution
1206
- Sports
1207
- Government
1208
- Cultural
1209
- Lifestyle
1210
- Political
1211
- Tourism
1212
- Youth
1213
- Senior
1214
- Tradeshow
1215
- Conference
1216
- FoodAndBeverage
1217
- TechAndStartups
1218
- }
1219
-
1220
- enum YearsOfExperience {
1221
- LessThanOneYear
1222
- OneToThreeYears
1223
- ThreeToFiveYears
1224
- FivePlusYears
1225
- }
1226
-
1227
- model ServiceRange {
1228
- id String @id @default(cuid())
1229
- min Int @default(0)
1230
- max Int @default(50)
1231
- serviceServiceRange Service? @relation("ServiceRange")
1232
- }
1233
-
1234
- model Availability {
1235
- id String @id @default(cuid())
1236
- startDateTime String
1237
- endDateTime String
1238
- venueId String?
1239
- venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1240
- eventServiceId String?
1241
- eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1242
- entertainmentServiceId String?
1243
- entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1244
- vendorId String?
1245
- vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1246
- exhibitorId String?
1247
- exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1248
- sponsorId String?
1249
- sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1250
- organizationId String?
1251
- organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1252
- }
1253
-
1254
- enum VisibilityPreference {
1255
- Public
1256
- Private
1257
- }
1258
-
1259
- enum MusicGenreType {
1260
- Classical
1261
- Rock
1262
- HipHop
1263
- Country
1264
- Pop
1265
- EDM
1266
- Indie
1267
- Acoustic
1268
- }
1269
-
1270
- enum ServiceType {
1271
- Volunteer
1272
- EventService
1273
- EntertainmentService
1274
- Vendor
1275
- Exhibitor
1276
- Sponsor
1277
- Venue
1278
- Organization
1279
- }
1280
-
1281
- enum UserRole {
1282
- User
1283
- Vendor
1284
- Sponsor
1285
- Investor
1286
- LoanProvider
1287
- VenueProvider
1288
- ServiceProvider
1289
- SuperAdmin
1290
- Exhibitor
1291
- }
1292
-
1293
- model UserLink {
1294
- id String @id @default(cuid())
1295
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1296
- linkId String
1297
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1298
- userId String
1299
- }
1300
-
1301
- model UserRating {
1302
- id String @id @default(cuid())
1303
- rating Int
1304
- comment String?
1305
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1306
- userRatingGivenId String
1307
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1308
- userId String
1309
- }
1310
-
1311
- model UserRatingGiven {
1312
- id String @id @default(cuid())
1313
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1314
- userId String
1315
- UserRating UserRating[]
1316
- }
1317
-
1318
- enum UserStatus {
1319
- Active
1320
- Inactive
1321
- Suspended
1322
- Deactivated
1323
- }
1324
-
1325
- model VerificationToken {
1326
- identifier String
1327
- token String @unique
1328
- expires DateTime
1329
-
1330
- @@unique([identifier, token])
1331
- }
1332
-
1333
- model ServiceLink {
1334
- id String @id @default(cuid())
1335
- serviceId String
1336
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1337
- linkId String
1338
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1339
- eventService EventService? @relation(fields: [eventServiceId], references: [id])
1340
- eventServiceId String?
1341
- entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1342
- entertainmentServiceId String?
1343
- vendor Vendor? @relation(fields: [vendorId], references: [id])
1344
- vendorId String?
1345
- exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1346
- exhibitorId String?
1347
- sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1348
- sponsorId String?
1349
- venue Venue? @relation(fields: [venueId], references: [id])
1350
- venueId String?
1351
- organization Organization? @relation(fields: [organizationId], references: [id])
1352
- organizationId String?
1353
-
1354
- @@index([serviceId])
1355
- }
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
+ organizations Organization[]
761
+ clubMembers ClubMember[]
762
+ clubAdmins ClubAdmin[]
763
+ links UserLink[]
764
+ status UserStatus
765
+ competitions Competition[]
766
+ competitionSponsorships CompetitionSponsor[]
767
+ competitionPrizes Prize[]
768
+ userRatingGiven UserRatingGiven[]
769
+ userRating UserRating[]
770
+ magicLink String?
771
+ magicLinkExpiration DateTime?
772
+ magicLinkUsed DateTime?
773
+ idVerified DateTime?
774
+ streetAddress String?
775
+ city String?
776
+ state String?
777
+ postalCode String?
778
+ country String? @default("US")
779
+ phone String?
780
+ documentIDId String? @unique
781
+ documentID DocumentID?
782
+ comment BashComment[]
783
+ associatedBashes AssociatedBash[]
784
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
785
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
786
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
787
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
788
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
789
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
790
+ checkouts Checkout[]
791
+ ticketTiersWaitListsIveJoined TicketTier[]
792
+ contacts Contact[]
793
+ bashEventPromoCodesIUsed BashEventPromoCode[]
794
+ }
795
+
796
+ model Contact {
797
+ id String @id @default(cuid())
798
+ contactOwnerId String
799
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
800
+ contactEmail String?
801
+ fullName String?
802
+ phone String?
803
+ requestToConnectSent DateTime?
804
+ requestToConnectAccepted DateTime?
805
+
806
+ @@unique([contactOwnerId, contactEmail])
807
+ @@index([contactEmail])
808
+ }
809
+
810
+ model AssociatedBash {
811
+ id String @id @default(cuid())
812
+ bashEventId String
813
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
814
+ invitationId String? @unique
815
+ invitation Invitation? @relation(fields: [invitationId], references: [id])
816
+ ownerEmail String?
817
+ ownerUserId String?
818
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
819
+ isOrganizer Boolean?
820
+ isFavorite Boolean?
821
+
822
+ @@unique([ownerEmail, bashEventId])
823
+ }
824
+
825
+ model Service {
826
+ id String @id @default(cuid())
827
+ ownerId String
828
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
829
+ email String
830
+ streetAddress String
831
+ city String
832
+ state String
833
+ postalCode String
834
+ country String
835
+ phone String
836
+ title String
837
+ coverPhoto String?
838
+ agreedToAgreement Boolean?
839
+ media Media[]
840
+ serviceTypes ServiceType[]
841
+ customServiceTag String[]
842
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
843
+ serviceLinks ServiceLink[]
844
+ description String?
845
+ canContact Boolean?
846
+ // musicGenre MusicGenreType?
847
+ visibility VisibilityPreference @default(Public)
848
+ // bashesInterestedIn BashEventType[]
849
+ status ServiceStatus @default(Draft)
850
+ venues Venue[]
851
+ serviceRangeId String @unique
852
+ serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
853
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
854
+ targetAudienceId String?
855
+ eventService EventService[]
856
+ entertainmentService EntertainmentService[]
857
+ vendor Vendor[]
858
+ exhibitor Exhibitor[]
859
+ sponsor Sponsor[]
860
+ organization Organization[]
861
+
862
+ @@index([email])
863
+ @@index([phone])
864
+ }
865
+
866
+ model EventService {
867
+ id String @id @default(cuid())
868
+ service Service? @relation(fields: [serviceId], references: [id])
869
+ serviceId String?
870
+ eventServiceName String
871
+ eventServiceTypes EventServiceType[]
872
+ eventServiceSubType String?
873
+ email String
874
+ streetAddress String
875
+ city String
876
+ state String
877
+ postalCode String
878
+ country String
879
+ phone String
880
+ coverPhoto String?
881
+ media Media[]
882
+ visibility VisibilityPreference @default(Public)
883
+ status ServiceStatus @default(Draft)
884
+ yearsOfExperience YearsOfExperience
885
+ description String?
886
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
887
+ additionalInfo String?
888
+ goodsOrServices String[]
889
+ menuItems String?
890
+ venueTypes String[]
891
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
892
+ mission String?
893
+ communityInvolvement String?
894
+ emergencyContact String?
895
+ contactDetails String?
896
+ rates String?
897
+ cancellationPolicy String?
898
+ refundPolicy String?
899
+ insurancePolicy String?
900
+ bashesInterestedIn BashEventType[]
901
+ links ServiceLink[]
902
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
903
+ targetAudienceId String?
904
+ crowdSizeId String?
905
+ User User? @relation(fields: [userId], references: [id])
906
+ userId String?
907
+ }
908
+
909
+ model EntertainmentService {
910
+ id String @id @default(cuid())
911
+ service Service? @relation(fields: [serviceId], references: [id])
912
+ serviceId String?
913
+ entertainmentServiceName String
914
+ entertainmentServiceTypes EntertainmentServiceType[]
915
+ entertainmentServiceSubType String?
916
+ genre MusicGenreType?
917
+ email String
918
+ streetAddress String
919
+ city String
920
+ state String
921
+ postalCode String
922
+ country String
923
+ phone String
924
+ coverPhoto String?
925
+ media Media[]
926
+ visibility VisibilityPreference @default(Public)
927
+ status ServiceStatus @default(Draft)
928
+ yearsOfExperience YearsOfExperience
929
+ description String?
930
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
931
+ additionalInfo String?
932
+ goodsOrServices String[]
933
+ venueTypes String[]
934
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
935
+ mission String?
936
+ communityInvolvement String?
937
+ emergencyContact String?
938
+ contactDetails String?
939
+ rates String?
940
+ cancellationPolicy String?
941
+ refundPolicy String?
942
+ insurancePolicy String?
943
+ bashesInterestedIn BashEventType[]
944
+ links ServiceLink[]
945
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
946
+ targetAudienceId String?
947
+ crowdSizeId String?
948
+ User User? @relation(fields: [userId], references: [id])
949
+ userId String?
950
+ }
951
+
952
+ model Vendor {
953
+ id String @id @default(cuid())
954
+ service Service? @relation(fields: [serviceId], references: [id])
955
+ serviceId String?
956
+ vendorName String
957
+ email String
958
+ streetAddress String
959
+ city String
960
+ state String
961
+ postalCode String
962
+ country String
963
+ phone String
964
+ coverPhoto String?
965
+ media Media[]
966
+ visibility VisibilityPreference @default(Public)
967
+ status ServiceStatus @default(Draft)
968
+ yearsOfExperience YearsOfExperience
969
+ description String?
970
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
971
+ additionalInfo String?
972
+ goodsOrServices String[]
973
+ menuItems String?
974
+ venueTypes String[]
975
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
976
+ mission String?
977
+ communityInvolvement String?
978
+ emergencyContact String?
979
+ contactDetails String?
980
+ rates String?
981
+ cancellationPolicy String?
982
+ refundPolicy String?
983
+ insurancePolicy String?
984
+ bashesInterestedIn BashEventType[]
985
+ links ServiceLink[]
986
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
987
+ targetAudienceId String?
988
+ User User? @relation(fields: [userId], references: [id])
989
+ userId String?
990
+ crowdSizeId String?
991
+ }
992
+
993
+ model Exhibitor {
994
+ id String @id @default(cuid())
995
+ service Service? @relation(fields: [serviceId], references: [id])
996
+ serviceId String?
997
+ exhibitorName String
998
+ email String
999
+ streetAddress String
1000
+ city String
1001
+ state String
1002
+ postalCode String
1003
+ country String
1004
+ phone String
1005
+ coverPhoto String?
1006
+ media Media[]
1007
+ visibility VisibilityPreference @default(Public)
1008
+ yearsOfExperience YearsOfExperience
1009
+ description String?
1010
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1011
+ additionalInfo String?
1012
+ goodsOrServices String[]
1013
+ venueTypes String[]
1014
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1015
+ status ServiceStatus @default(Draft)
1016
+ mission String?
1017
+ communityInvolvement String?
1018
+ emergencyContact String?
1019
+ contactDetails String?
1020
+ rates String?
1021
+ cancellationPolicy String?
1022
+ refundPolicy String?
1023
+ insurancePolicy String?
1024
+ bashesInterestedIn BashEventType[]
1025
+ links ServiceLink[]
1026
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1027
+ targetAudienceId String?
1028
+ User User? @relation(fields: [userId], references: [id])
1029
+ userId String?
1030
+ crowdSizeId String?
1031
+ }
1032
+
1033
+ model Sponsor {
1034
+ id String @id @default(cuid())
1035
+ service Service? @relation(fields: [serviceId], references: [id])
1036
+ serviceId String?
1037
+ sponsorName String
1038
+ email String
1039
+ streetAddress String
1040
+ city String
1041
+ state String
1042
+ postalCode String
1043
+ country String
1044
+ phone String
1045
+ coverPhoto String?
1046
+ media Media[]
1047
+ visibility VisibilityPreference @default(Public)
1048
+ status ServiceStatus @default(Draft)
1049
+ yearsOfExperience YearsOfExperience
1050
+ description String?
1051
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1052
+ additionalInfo String?
1053
+ goodsOrServices String[]
1054
+ menuItems String?
1055
+ venueTypes String[]
1056
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1057
+ mission String?
1058
+ communityInvolvement String?
1059
+ emergencyContact String?
1060
+ contactDetails String?
1061
+ rates String?
1062
+ cancellationPolicy String?
1063
+ refundPolicy String?
1064
+ insurancePolicy String?
1065
+ bashesInterestedIn BashEventType[]
1066
+ links ServiceLink[]
1067
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1068
+ targetAudienceId String?
1069
+ crowdSizeId String?
1070
+ User User? @relation(fields: [userId], references: [id])
1071
+ userId String?
1072
+ }
1073
+
1074
+ model Venue {
1075
+ id String @id @default(cuid())
1076
+ service Service? @relation(fields: [serviceId], references: [id])
1077
+ serviceId String?
1078
+ venueName String
1079
+ email String
1080
+ streetAddress String
1081
+ city String
1082
+ state String
1083
+ postalCode String
1084
+ country String
1085
+ phone String
1086
+ coverPhoto String?
1087
+ media Media[]
1088
+ visibility VisibilityPreference @default(Public)
1089
+ status ServiceStatus @default(Draft)
1090
+ yearsInBusiness YearsOfExperience
1091
+ description String?
1092
+ capacity AmountOfGuests?
1093
+ amenities String[]
1094
+ menuItems String?
1095
+ additionalInfo String?
1096
+ features String[]
1097
+ venueTypes String[]
1098
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1099
+ // specialDateTimes Availability[] @relation("SpecialDateTimes")
1100
+ mission String?
1101
+ pitch String?
1102
+ communityInvolvement String?
1103
+ emergencyContact String?
1104
+ contactDetails String?
1105
+ rates String?
1106
+ cancellationPolicy String?
1107
+ refundPolicy String?
1108
+ safetyPolicy String?
1109
+ insurancePolicy String?
1110
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1111
+ targetAudienceId String?
1112
+ bashesInterestedIn BashEventType[]
1113
+ links ServiceLink[]
1114
+ }
1115
+
1116
+ model Organization {
1117
+ id String @id @default(cuid())
1118
+ service Service? @relation(fields: [serviceId], references: [id])
1119
+ serviceId String?
1120
+ organizationName String
1121
+ organizationType OrganizationType[]
1122
+ email String
1123
+ streetAddress String
1124
+ city String
1125
+ state String
1126
+ postalCode String
1127
+ country String
1128
+ phone String
1129
+ coverPhoto String?
1130
+ media Media[]
1131
+ visibility VisibilityPreference @default(Public)
1132
+ status ServiceStatus @default(Draft)
1133
+ description String?
1134
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1135
+ additionalInfo String?
1136
+ goodsOrServices String[]
1137
+ venueTypes String[]
1138
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
1139
+ mission String?
1140
+ communityInvolvement String?
1141
+ emergencyContact String?
1142
+ contactDetails String?
1143
+ rates String?
1144
+ cancellationPolicy String?
1145
+ refundPolicy String?
1146
+ insurancePolicy String?
1147
+ bashesInterestedIn BashEventType[]
1148
+ links ServiceLink[]
1149
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1150
+ targetAudienceId String?
1151
+ crowdSizeId String?
1152
+ User User? @relation(fields: [userId], references: [id])
1153
+ userId String?
1154
+ }
1155
+
1156
+ enum EventServiceType {
1157
+ Investor
1158
+ LongTermLoan
1159
+ ShortTermLoan
1160
+ EventPlanning
1161
+ Caterer
1162
+ Cleaner
1163
+ Decorator
1164
+ InteriorDesigner
1165
+ RentalEquipmentProvider
1166
+ FoodAndBeverageProvider
1167
+ MediaCapture
1168
+ AVTechnician
1169
+ GraphicDesigner
1170
+ Influencer
1171
+ Promoter
1172
+ CelebrityAppearance
1173
+ CrewHand
1174
+ EventManager
1175
+ VirtualAssistant
1176
+ Consulting
1177
+ Transportation
1178
+ }
1179
+
1180
+ enum EntertainmentServiceType {
1181
+ Emcees
1182
+ DJs
1183
+ Bands
1184
+ SoloMusicians
1185
+ Comedy
1186
+ VarietyActs
1187
+ PerformanceArtists
1188
+ Magic
1189
+ Dancers
1190
+ Aerialists
1191
+ Impersonators
1192
+ Speakers
1193
+ Auctioneers
1194
+ }
1195
+
1196
+ enum OrganizationType {
1197
+ Church
1198
+ GreekLife
1199
+ SocialClub
1200
+ Nonprofit
1201
+ Corporation
1202
+ EducationalInstitution
1203
+ Sports
1204
+ Government
1205
+ Cultural
1206
+ Lifestyle
1207
+ Political
1208
+ Tourism
1209
+ Youth
1210
+ Senior
1211
+ Tradeshow
1212
+ Conference
1213
+ FoodAndBeverage
1214
+ TechAndStartups
1215
+ }
1216
+
1217
+ enum YearsOfExperience {
1218
+ LessThanOneYear
1219
+ OneToThreeYears
1220
+ ThreeToFiveYears
1221
+ FivePlusYears
1222
+ }
1223
+
1224
+ model ServiceRange {
1225
+ id String @id @default(cuid())
1226
+ min Int @default(0)
1227
+ max Int @default(50)
1228
+ serviceServiceRange Service? @relation("ServiceRange")
1229
+ }
1230
+
1231
+ model Availability {
1232
+ id String @id @default(cuid())
1233
+ startDateTime String
1234
+ endDateTime String
1235
+ venueId String?
1236
+ venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1237
+ eventServiceId String?
1238
+ eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1239
+ entertainmentServiceId String?
1240
+ entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1241
+ vendorId String?
1242
+ vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1243
+ exhibitorId String?
1244
+ exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1245
+ sponsorId String?
1246
+ sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1247
+ organizationId String?
1248
+ organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1249
+ }
1250
+
1251
+ enum VisibilityPreference {
1252
+ Public
1253
+ Private
1254
+ }
1255
+
1256
+ enum MusicGenreType {
1257
+ Classical
1258
+ Rock
1259
+ HipHop
1260
+ Country
1261
+ Pop
1262
+ EDM
1263
+ Indie
1264
+ Acoustic
1265
+ }
1266
+
1267
+ enum ServiceType {
1268
+ Volunteer
1269
+ EventService
1270
+ EntertainmentService
1271
+ Vendor
1272
+ Exhibitor
1273
+ Sponsor
1274
+ Venue
1275
+ Organization
1276
+ }
1277
+
1278
+ enum UserRole {
1279
+ User
1280
+ Vendor
1281
+ Sponsor
1282
+ Investor
1283
+ LoanProvider
1284
+ VenueProvider
1285
+ ServiceProvider
1286
+ SuperAdmin
1287
+ Exhibitor
1288
+ }
1289
+
1290
+ model UserLink {
1291
+ id String @id @default(cuid())
1292
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1293
+ linkId String
1294
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1295
+ userId String
1296
+ }
1297
+
1298
+ model UserRating {
1299
+ id String @id @default(cuid())
1300
+ rating Int
1301
+ comment String?
1302
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1303
+ userRatingGivenId String
1304
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1305
+ userId String
1306
+ }
1307
+
1308
+ model UserRatingGiven {
1309
+ id String @id @default(cuid())
1310
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1311
+ userId String
1312
+ UserRating UserRating[]
1313
+ }
1314
+
1315
+ enum UserStatus {
1316
+ Active
1317
+ Inactive
1318
+ Suspended
1319
+ Deactivated
1320
+ }
1321
+
1322
+ model VerificationToken {
1323
+ identifier String
1324
+ token String @unique
1325
+ expires DateTime
1326
+
1327
+ @@unique([identifier, token])
1328
+ }
1329
+
1330
+ model ServiceLink {
1331
+ id String @id @default(cuid())
1332
+ serviceId String
1333
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1334
+ linkId String
1335
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1336
+ eventService EventService? @relation(fields: [eventServiceId], references: [id])
1337
+ eventServiceId String?
1338
+ entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1339
+ entertainmentServiceId String?
1340
+ vendor Vendor? @relation(fields: [vendorId], references: [id])
1341
+ vendorId String?
1342
+ exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1343
+ exhibitorId String?
1344
+ sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1345
+ sponsorId String?
1346
+ venue Venue? @relation(fields: [venueId], references: [id])
1347
+ venueId String?
1348
+ organization Organization? @relation(fields: [organizationId], references: [id])
1349
+ organizationId String?
1350
+
1351
+ @@index([serviceId])
1352
+ }