@bash-app/bash-common 18.4.0 → 18.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1362 +1,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
- 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
- trademark String?
863
- manager String?
864
- dba String?
865
- contactPerson String?
866
- contactPhone String?
867
- contactEmail String?
868
- businessPhone String?
869
-
870
- @@index([email])
871
- @@index([phone])
872
- }
873
-
874
- model EventService {
875
- id String @id @default(cuid())
876
- service Service? @relation(fields: [serviceId], references: [id])
877
- serviceId String?
878
- eventServiceName String
879
- eventServiceTypes EventServiceType[]
880
- eventServiceSubType String?
881
- email String
882
- streetAddress String
883
- city String
884
- state String
885
- postalCode String
886
- country String
887
- phone String
888
- coverPhoto String?
889
- media Media[]
890
- visibility VisibilityPreference @default(Public)
891
- status ServiceStatus @default(Draft)
892
- yearsOfExperience YearsOfExperience
893
- description String?
894
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
895
- additionalInfo String?
896
- goodsOrServices String[]
897
- menuItems String?
898
- venueTypes String[]
899
- availableDateTimes Availability[] @relation("AvailableDateTimes")
900
- mission String?
901
- communityInvolvement String?
902
- emergencyContact String?
903
- contactDetails String?
904
- rates String?
905
- cancellationPolicy String?
906
- refundPolicy String?
907
- insurancePolicy String?
908
- bashesInterestedIn BashEventType[]
909
- links ServiceLink[]
910
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
911
- targetAudienceId String?
912
- crowdSizeId String?
913
- User User? @relation(fields: [userId], references: [id])
914
- userId String?
915
- }
916
-
917
- model EntertainmentService {
918
- id String @id @default(cuid())
919
- service Service? @relation(fields: [serviceId], references: [id])
920
- serviceId String?
921
- entertainmentServiceName String
922
- entertainmentServiceTypes EntertainmentServiceType[]
923
- entertainmentServiceSubType String?
924
- genre MusicGenreType?
925
- email String
926
- streetAddress String
927
- city String
928
- state String
929
- postalCode String
930
- country String
931
- phone String
932
- coverPhoto String?
933
- media Media[]
934
- visibility VisibilityPreference @default(Public)
935
- status ServiceStatus @default(Draft)
936
- yearsOfExperience YearsOfExperience
937
- description String?
938
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
939
- additionalInfo String?
940
- goodsOrServices String[]
941
- venueTypes String[]
942
- availableDateTimes Availability[] @relation("AvailableDateTimes")
943
- mission String?
944
- communityInvolvement String?
945
- emergencyContact String?
946
- contactDetails String?
947
- rates String?
948
- cancellationPolicy String?
949
- refundPolicy String?
950
- insurancePolicy String?
951
- bashesInterestedIn BashEventType[]
952
- links ServiceLink[]
953
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
954
- targetAudienceId String?
955
- crowdSizeId String?
956
- User User? @relation(fields: [userId], references: [id])
957
- userId String?
958
- }
959
-
960
- model Vendor {
961
- id String @id @default(cuid())
962
- service Service? @relation(fields: [serviceId], references: [id])
963
- serviceId String?
964
- vendorName String
965
- email String
966
- streetAddress String
967
- city String
968
- state String
969
- postalCode String
970
- country String
971
- phone String
972
- coverPhoto String?
973
- media Media[]
974
- visibility VisibilityPreference @default(Public)
975
- status ServiceStatus @default(Draft)
976
- yearsOfExperience YearsOfExperience
977
- description String?
978
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
979
- additionalInfo String?
980
- goodsOrServices String[]
981
- menuItems String?
982
- venueTypes String[]
983
- availableDateTimes Availability[] @relation("AvailableDateTimes")
984
- mission String?
985
- communityInvolvement String?
986
- emergencyContact String?
987
- contactDetails String?
988
- rates String?
989
- cancellationPolicy String?
990
- refundPolicy String?
991
- insurancePolicy String?
992
- bashesInterestedIn BashEventType[]
993
- links ServiceLink[]
994
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
995
- targetAudienceId String?
996
- User User? @relation(fields: [userId], references: [id])
997
- userId String?
998
- crowdSizeId String?
999
- }
1000
-
1001
- model Exhibitor {
1002
- id String @id @default(cuid())
1003
- service Service? @relation(fields: [serviceId], references: [id])
1004
- serviceId String?
1005
- exhibitorName String
1006
- email String
1007
- streetAddress String
1008
- city String
1009
- state String
1010
- postalCode String
1011
- country String
1012
- phone String
1013
- coverPhoto String?
1014
- media Media[]
1015
- visibility VisibilityPreference @default(Public)
1016
- yearsOfExperience YearsOfExperience
1017
- description String?
1018
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1019
- additionalInfo String?
1020
- goodsOrServices String[]
1021
- venueTypes String[]
1022
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1023
- status ServiceStatus @default(Draft)
1024
- mission String?
1025
- communityInvolvement String?
1026
- emergencyContact String?
1027
- contactDetails String?
1028
- rates String?
1029
- cancellationPolicy String?
1030
- refundPolicy String?
1031
- insurancePolicy String?
1032
- bashesInterestedIn BashEventType[]
1033
- links ServiceLink[]
1034
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1035
- targetAudienceId String?
1036
- User User? @relation(fields: [userId], references: [id])
1037
- userId String?
1038
- crowdSizeId String?
1039
- }
1040
-
1041
- model Sponsor {
1042
- id String @id @default(cuid())
1043
- service Service? @relation(fields: [serviceId], references: [id])
1044
- serviceId String?
1045
- sponsorName String
1046
- email String
1047
- streetAddress String
1048
- city String
1049
- state String
1050
- postalCode String
1051
- country String
1052
- phone String
1053
- coverPhoto String?
1054
- media Media[]
1055
- visibility VisibilityPreference @default(Public)
1056
- status ServiceStatus @default(Draft)
1057
- yearsOfExperience YearsOfExperience
1058
- description String?
1059
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1060
- additionalInfo String?
1061
- goodsOrServices String[]
1062
- menuItems String?
1063
- venueTypes String[]
1064
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1065
- mission String?
1066
- communityInvolvement String?
1067
- emergencyContact String?
1068
- contactDetails String?
1069
- rates String?
1070
- cancellationPolicy String?
1071
- refundPolicy String?
1072
- insurancePolicy String?
1073
- bashesInterestedIn BashEventType[]
1074
- links ServiceLink[]
1075
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1076
- targetAudienceId String?
1077
- crowdSizeId String?
1078
- User User? @relation(fields: [userId], references: [id])
1079
- userId String?
1080
- }
1081
-
1082
- model Venue {
1083
- id String @id @default(cuid())
1084
- service Service? @relation(fields: [serviceId], references: [id])
1085
- serviceId String?
1086
- venueName String
1087
- email String
1088
- streetAddress String
1089
- city String
1090
- state String
1091
- postalCode String
1092
- country String
1093
- phone String
1094
- coverPhoto String?
1095
- media Media[]
1096
- visibility VisibilityPreference @default(Public)
1097
- status ServiceStatus @default(Draft)
1098
- yearsInBusiness YearsOfExperience
1099
- description String?
1100
- capacity AmountOfGuests?
1101
- amenities String[]
1102
- menuItems String?
1103
- additionalInfo String?
1104
- features String[]
1105
- venueTypes String[]
1106
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1107
- // specialDateTimes Availability[] @relation("SpecialDateTimes")
1108
- mission String?
1109
- pitch String?
1110
- communityInvolvement String?
1111
- emergencyContact String?
1112
- contactDetails String?
1113
- rates String?
1114
- cancellationPolicy String?
1115
- refundPolicy String?
1116
- safetyPolicy String?
1117
- insurancePolicy String?
1118
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1119
- targetAudienceId String?
1120
- bashesInterestedIn BashEventType[]
1121
- links ServiceLink[]
1122
- User User? @relation(fields: [userId], references: [id])
1123
- userId String?
1124
- }
1125
-
1126
- model Organization {
1127
- id String @id @default(cuid())
1128
- service Service? @relation(fields: [serviceId], references: [id])
1129
- serviceId String?
1130
- organizationName String
1131
- organizationType OrganizationType[]
1132
- email String
1133
- streetAddress String
1134
- city String
1135
- state String
1136
- postalCode String
1137
- country String
1138
- phone String
1139
- coverPhoto String?
1140
- media Media[]
1141
- visibility VisibilityPreference @default(Public)
1142
- status ServiceStatus @default(Draft)
1143
- description String?
1144
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1145
- additionalInfo String?
1146
- goodsOrServices String[]
1147
- venueTypes String[]
1148
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1149
- mission String?
1150
- communityInvolvement String?
1151
- emergencyContact String?
1152
- contactDetails String?
1153
- rates String?
1154
- cancellationPolicy String?
1155
- refundPolicy String?
1156
- insurancePolicy String?
1157
- bashesInterestedIn BashEventType[]
1158
- links ServiceLink[]
1159
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1160
- targetAudienceId String?
1161
- crowdSizeId String?
1162
- User User? @relation(fields: [userId], references: [id])
1163
- userId String?
1164
- }
1165
-
1166
- enum EventServiceType {
1167
- Investor
1168
- LongTermLoan
1169
- ShortTermLoan
1170
- EventPlanning
1171
- Caterer
1172
- Cleaner
1173
- Decorator
1174
- InteriorDesigner
1175
- RentalEquipmentProvider
1176
- FoodAndBeverageProvider
1177
- MediaCapture
1178
- AVTechnician
1179
- GraphicDesigner
1180
- Influencer
1181
- Promoter
1182
- CelebrityAppearance
1183
- CrewHand
1184
- EventManager
1185
- VirtualAssistant
1186
- Consulting
1187
- Transportation
1188
- }
1189
-
1190
- enum EntertainmentServiceType {
1191
- Emcees
1192
- DJs
1193
- Bands
1194
- SoloMusicians
1195
- Comedy
1196
- VarietyActs
1197
- PerformanceArtists
1198
- Magic
1199
- Dancers
1200
- Aerialists
1201
- Impersonators
1202
- Speakers
1203
- Auctioneers
1204
- }
1205
-
1206
- enum OrganizationType {
1207
- Church
1208
- GreekLife
1209
- SocialClub
1210
- Nonprofit
1211
- Corporation
1212
- EducationalInstitution
1213
- Sports
1214
- Government
1215
- Cultural
1216
- Lifestyle
1217
- Political
1218
- Tourism
1219
- Youth
1220
- Senior
1221
- Tradeshow
1222
- Conference
1223
- FoodAndBeverage
1224
- TechAndStartups
1225
- }
1226
-
1227
- enum YearsOfExperience {
1228
- LessThanOneYear
1229
- OneToThreeYears
1230
- ThreeToFiveYears
1231
- FivePlusYears
1232
- }
1233
-
1234
- model ServiceRange {
1235
- id String @id @default(cuid())
1236
- min Int @default(0)
1237
- max Int @default(50)
1238
- serviceServiceRange Service? @relation("ServiceRange")
1239
- }
1240
-
1241
- model Availability {
1242
- id String @id @default(cuid())
1243
- startDateTime String
1244
- endDateTime String
1245
- venueId String?
1246
- venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1247
- eventServiceId String?
1248
- eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1249
- entertainmentServiceId String?
1250
- entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1251
- vendorId String?
1252
- vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1253
- exhibitorId String?
1254
- exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1255
- sponsorId String?
1256
- sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1257
- organizationId String?
1258
- organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1259
- }
1260
-
1261
- enum VisibilityPreference {
1262
- Public
1263
- Private
1264
- }
1265
-
1266
- enum MusicGenreType {
1267
- Classical
1268
- Rock
1269
- HipHop
1270
- Country
1271
- Pop
1272
- EDM
1273
- Indie
1274
- Acoustic
1275
- }
1276
-
1277
- enum ServiceType {
1278
- Volunteer
1279
- EventService
1280
- EntertainmentService
1281
- Vendor
1282
- Exhibitor
1283
- Sponsor
1284
- Venue
1285
- Organization
1286
- }
1287
-
1288
- enum UserRole {
1289
- User
1290
- Vendor
1291
- Sponsor
1292
- Investor
1293
- LoanProvider
1294
- VenueProvider
1295
- ServiceProvider
1296
- SuperAdmin
1297
- Exhibitor
1298
- }
1299
-
1300
- model UserLink {
1301
- id String @id @default(cuid())
1302
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1303
- linkId String
1304
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1305
- userId String
1306
- }
1307
-
1308
- model UserRating {
1309
- id String @id @default(cuid())
1310
- rating Int
1311
- comment String?
1312
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1313
- userRatingGivenId String
1314
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1315
- userId String
1316
- }
1317
-
1318
- model UserRatingGiven {
1319
- id String @id @default(cuid())
1320
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1321
- userId String
1322
- UserRating UserRating[]
1323
- }
1324
-
1325
- enum UserStatus {
1326
- Active
1327
- Inactive
1328
- Suspended
1329
- Deactivated
1330
- }
1331
-
1332
- model VerificationToken {
1333
- identifier String
1334
- token String @unique
1335
- expires DateTime
1336
-
1337
- @@unique([identifier, token])
1338
- }
1339
-
1340
- model ServiceLink {
1341
- id String @id @default(cuid())
1342
- serviceId String
1343
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1344
- linkId String
1345
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1346
- eventService EventService? @relation(fields: [eventServiceId], references: [id])
1347
- eventServiceId String?
1348
- entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1349
- entertainmentServiceId String?
1350
- vendor Vendor? @relation(fields: [vendorId], references: [id])
1351
- vendorId String?
1352
- exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1353
- exhibitorId String?
1354
- sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1355
- sponsorId String?
1356
- venue Venue? @relation(fields: [venueId], references: [id])
1357
- venueId String?
1358
- organization Organization? @relation(fields: [organizationId], references: [id])
1359
- organizationId String?
1360
-
1361
- @@index([serviceId])
1362
- }
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
+ }