@bash-app/bash-common 29.45.0 → 29.48.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,1623 +1,1628 @@
1
- // This is your Prisma schema file,
2
- // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
-
4
- generator client {
5
- provider = "prisma-client-js"
6
- }
7
-
8
- datasource db {
9
- provider = "postgresql"
10
- url = env("POSTGRES_PRISMA_URL") // uses connection pooling
11
- directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
12
- }
13
-
14
- model Club {
15
- id String @id @default(cuid())
16
- name String
17
- street String
18
- userId String
19
- price Int?
20
- events BashEvent[]
21
- members ClubMember[]
22
- admin ClubAdmin[]
23
- }
24
-
25
- model ClubAdmin {
26
- id String @id @default(cuid())
27
- admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
28
- userId String
29
- club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
30
- clubId String
31
- role ClubAdminRole
32
- }
33
-
34
- model ClubMember {
35
- id String @id @default(cuid())
36
- member User @relation(fields: [userId], references: [id], onDelete: Cascade)
37
- userId String
38
- club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
39
- clubId String
40
- status ClubMemberStatus
41
- statusHistory Json
42
- price Int?
43
- }
44
-
45
- enum ClubAdminRole {
46
- Owner
47
- Admin
48
- Staff
49
- }
50
-
51
- enum ClubMemberStatus {
52
- Active
53
- Inactive
54
- Canceled
55
- Paused
56
- Removed
57
- }
58
-
59
- model BashComment {
60
- id String @id @default(cuid())
61
- creatorId String
62
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
63
- content String
64
- reviewId String?
65
- review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
66
- bashEventId String?
67
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
68
- parentCommentId String?
69
- parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
70
- replies BashComment[] @relation("CommentReplies")
71
- }
72
-
73
- model Competition {
74
- id String @id @default(cuid())
75
- name String
76
- description String
77
- owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
78
- prizes Prize[]
79
- userId String
80
- sponser CompetitionSponsor[]
81
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
82
- bashEventId String
83
- numberOfPrizes Int
84
- }
85
-
86
- model CompetitionSponsor {
87
- id String @id @default(cuid())
88
- competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
89
- sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
90
- competitionId String
91
- userId String
92
- description String
93
- paidOn String?
94
- }
95
-
96
- model EventTask {
97
- id String @id @default(cuid())
98
- creatorId String
99
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
100
- bashEventId String
101
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
102
- description String
103
- assignedToId String?
104
- assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
105
- status TaskStatus?
106
- bashNotificationsReferencingMe BashNotification[]
107
- createdAt DateTime? @default(now())
108
- }
109
-
110
- enum TaskStatus {
111
- Accepted
112
- Rejected
113
- Completed
114
- }
115
-
116
- model Reminder {
117
- id String @id @default(cuid())
118
- creatorId String
119
- creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
120
- remindWhoId String?
121
- remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
122
- remindDateTime DateTime
123
- notificationId String
124
- notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
125
- }
126
-
127
- model BashEventPromoCode {
128
- id String @id @default(cuid())
129
- code String
130
- ticketTierId String
131
- ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
132
- stripeCouponId String?
133
- discountAmountInCents Int?
134
- discountAmountPercentage Int?
135
- maxRedemptions Int?
136
- redeemBy DateTime?
137
- usedBy User[]
138
-
139
- @@unique([ticketTierId, code])
140
- }
141
-
142
- model BashNotification {
143
- id String @id @default(cuid())
144
- creatorId String
145
- creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
146
- email String
147
- createdDateTime DateTime @default(now())
148
- message String
149
- image String?
150
- readDateTime DateTime?
151
- taskId String?
152
- eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
153
- invitationId String?
154
- invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
155
- bashEventId String?
156
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
157
- reminders Reminder[]
158
- redirectUrl String?
159
-
160
- @@unique([creatorId, email, bashEventId])
161
- @@unique([creatorId, email, invitationId])
162
- @@index([creatorId])
163
- }
164
-
165
- model Invitation {
166
- id String @id @default(cuid())
167
- creatorId String
168
- creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
169
- email String
170
- sentToId String?
171
- sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
172
- bashEventId String?
173
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
174
- image String?
175
- phone String?
176
- name String?
177
- message String?
178
- inviteDate DateTime? @default(now())
179
- acceptedDate DateTime?
180
- rejectedDate DateTime?
181
- maybeDate DateTime?
182
- tickets Ticket[] @relation("TicketsForInvitation")
183
- bashNotifications BashNotification[]
184
- associatedBash AssociatedBash?
185
-
186
- @@index([email])
187
- }
188
-
189
- model BashEvent {
190
- id String @id @default(cuid())
191
- title String
192
- creatorId String
193
- creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
194
- isApproved Boolean?
195
- description String?
196
- eventType String @default("Other")
197
- startDateTime DateTime? @default(now())
198
- endDateTime DateTime? @default(now())
199
- ticketTiers TicketTier[]
200
- targetAudienceId String? @unique
201
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
202
- amountOfGuestsId String? @unique
203
- amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
204
- recurrence Recurrence?
205
- vibe String?
206
- occasion String?
207
- dress String?
208
- allowed String?
209
- notAllowed String?
210
- nonProfit Boolean?
211
- nonProfitId String?
212
- privacy Privacy @default(Public)
213
- tickets Ticket[]
214
- reviews Review[]
215
- sponsorships SponsoredEvent[]
216
- investments Investment[]
217
- capacity Int?
218
- location String?
219
- status BashStatus @default(Draft)
220
- tags String[]
221
- coverPhoto String?
222
- media Media[]
223
- club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
224
- clubId String?
225
- links EventLink[]
226
- competitions Competition[]
227
- invitations Invitation[]
228
- dateTimePublished DateTime?
229
- comments BashComment[]
230
- includedItems String[]
231
- associatedBashesReferencingMe AssociatedBash[] // maybe rename later to AssociatedWithABash
232
- associatedServicesReferencingMe Service[] // maybe rename later to AssociatedWithAService
233
- bashNotificationsReferencingMe BashNotification[]
234
- checkouts Checkout[]
235
- eventTasks EventTask[]
236
- videoLink String?
237
- subtitle String?
238
- isFeatured Boolean?
239
- isTrending Boolean?
240
- coordinates Coordinates[] // A BashEvent can have multiple sets of coordinates
241
- // stripeAccount StripeAccount[]
242
- // rate Rate[]
243
- venueId String? // Nullable, meaning it's optional
244
- venue Venue? @relation(fields: [venueId], references: [id])
245
- }
246
-
247
- model Coordinates {
248
- id Int @id @default(autoincrement())
249
- lat Float?
250
- lng Float?
251
- bashEventId String? // Foreign key to BashEvent, now of type String
252
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
253
- }
254
-
255
- model Checkout {
256
- id String @id @default(cuid())
257
- ownerId String
258
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
259
- bashEventId String
260
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
261
- checkoutDateTime DateTime? @default(now())
262
- tickets Ticket[]
263
- stripeCheckoutSessionId String? @unique
264
- bookings Booking[]
265
-
266
- @@index(bashEventId)
267
- }
268
-
269
- model TicketTier {
270
- id String @id @default(cuid())
271
- bashEventId String
272
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
273
- tickets Ticket[]
274
- waitList User[]
275
- price Int @default(0) //stored multipled by 100 to allow for decimals
276
- title String @default("Free")
277
- sortOrder Int?
278
- description String?
279
- maximumNumberOfTickets Int @default(100)
280
- maximumTicketCount Int @default(100)
281
- isDonationTier Boolean?
282
- hidden Boolean?
283
- promoCodes BashEventPromoCode[]
284
-
285
- @@unique([bashEventId, title])
286
- }
287
-
288
- model Ticket {
289
- id String @id @default(cuid())
290
- ownerId String
291
- owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
292
- bashEventId String
293
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
294
- ticketTierId String?
295
- ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
296
- validDate DateTime?
297
- forUserId String?
298
- forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
299
- fullName String?
300
- email String?
301
- paidOn DateTime?
302
- allowPromiseToPay Boolean?
303
- status TicketStatus?
304
- isFreeGuest Boolean?
305
- geoFenceCheckInUnnecessary Boolean?
306
- checkedInAt DateTime?
307
- checkedOutAt DateTime?
308
- invitationId String?
309
- invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
310
- checkoutId String?
311
- checkout Checkout? @relation(fields: [checkoutId], references: [id])
312
- ServiceCheckout ServiceCheckout? @relation(fields: [serviceCheckoutId], references: [id])
313
- serviceCheckoutId String?
314
-
315
- @@index([bashEventId])
316
- }
317
-
318
- enum TicketStatus {
319
- Cancelled
320
- Attended
321
- Missed
322
- }
323
-
324
- model ServiceCheckout {
325
- id String @id @default(cuid())
326
- ownerId String
327
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
328
- checkoutDateTime DateTime? @default(now())
329
- tickets Ticket[]
330
- stripeCheckoutSessionId String? @unique
331
- }
332
-
333
- model UserSubscription {
334
- id String @id @default(cuid())
335
- ownerId String @unique
336
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
337
- type UserSubscriptionType
338
- }
339
-
340
- enum UserSubscriptionType {
341
- Free
342
- Premium
343
- VIP
344
- }
345
-
346
- enum BookingStatus {
347
- Cancelled
348
- Completed
349
- Missed
350
- }
351
-
352
- model Booking {
353
- id String @id @default(cuid())
354
- serviceId String
355
- service Service @relation(fields: [serviceId], references: [id])
356
- validDate DateTime?
357
- forUserId String?
358
- forUser User? @relation(fields: [forUserId], references: [id])
359
- fullName String?
360
- email String?
361
- paidOn DateTime?
362
- requireDeposit Boolean?
363
- status BookingStatus?
364
- geoFenceCheckInUnnecessary Boolean?
365
- checkedInAt DateTime?
366
- checkedOutAt DateTime?
367
- checkoutId String?
368
- checkout Checkout? @relation(fields: [checkoutId], references: [id])
369
-
370
- @@index([serviceId])
371
- @@index([forUserId])
372
- @@index([checkoutId])
373
- }
374
-
375
- model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
376
- id String @id @default(cuid())
377
- doNotUseVibeEnum BashEventVibeTags @default(Wild)
378
- doNotUseDressEnum BashEventDressTags @default(Casual)
379
- doNotUseBashEventType BashEventType @default(Other)
380
- doNotUseDayOfWeek DayOfWeek @default(Sunday)
381
- }
382
-
383
- model Recurrence {
384
- id String @id @default(cuid())
385
- interval Int @default(1)
386
- bashEventId String @unique
387
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
388
- frequency RecurringFrequency @default(Never)
389
- ends DateTime @default(now())
390
- repeatOnDays DayOfWeek[]
391
- repeatOnDayOfMonth Int?
392
- repeatYearlyDate DateTime?
393
- }
394
-
395
- enum DayOfWeek {
396
- Sunday
397
- Monday
398
- Tuesday
399
- Wednesday
400
- Thursday
401
- Friday
402
- Saturday
403
- }
404
-
405
- enum RecurringFrequency {
406
- Never
407
- Daily
408
- Weekly
409
- Monthly
410
- Yearly
411
- }
412
-
413
- enum BashEventVibeTags {
414
- Wild
415
- Calm
416
- }
417
-
418
- enum BashEventDressTags {
419
- Casual
420
- BusinessCasual
421
- Formal
422
- }
423
-
424
- // enum ServicesTags {
425
- // Fast
426
- // Reliable
427
- // AwardRecipient
428
- // }
429
-
430
- enum BashEventType {
431
- AfterParty
432
- AnimeAndCosplayFestival
433
- AnniversaryCelebration
434
- ArtExhibitOpening
435
- ArtAndCraftNight
436
- BBQCookout
437
- BabyShower
438
- BachelorOrBacheloretteParty
439
- BeachParty
440
- Birthday
441
- BoatPartyOrCruise
442
- Bonfire
443
- BookClubMeeting
444
- BridalShower
445
- BrunchGathering
446
- CarShow
447
- CarnivalAndFair
448
- CasinoNight
449
- CasualMixer
450
- CharityBall
451
- CharityFundraiser
452
- ChristmasParty
453
- ChurchEvent
454
- CircusOrCarnivalParty
455
- CocktailParty
456
- CollegeParty_FraternityOrSorority
457
- ComedyShowOrStandUpComedyNight
458
- ComicConvention
459
- Competition
460
- Concert
461
- CookingCompetition
462
- CorporateEventOrOfficeParty
463
- CostumeParty_Theme_Based
464
- CulturalFestival
465
- DanceParty
466
- DesertRave
467
- DiscoNight
468
- EasterGathering
469
- EngagementParty
470
- ESportsGamingTournament
471
- ExclusiveLuxuryRetreat
472
- FantasyThemedParty
473
- FashionShow
474
- Fireside
475
- FitnessFestival
476
- FlashMob
477
- Festival
478
- FestivalFilm
479
- FestivalFood
480
- FundraisingEvent
481
- GalaDinner
482
- GameNight
483
- GamingEvent
484
- GardenParty
485
- GoingAwayPartyOrFarewell
486
- GraduationParty
487
- HalloweenCostumeParty
488
- HanukkahParty
489
- HistoricalEraParty
490
- HolidayParty
491
- HouseParty
492
- HousewarmingParty
493
- KaraokeNight
494
- KiteFlyingFestival
495
- LiveBandPerformanceInALocalVenue
496
- Luau
497
- MansionParty
498
- MardiGras
499
- MasqueradeBall
500
- MotorcycleRally
501
- MovieNight
502
- MoviePremiere
503
- MusicFestival
504
- NewYearsEveCelebration
505
- OpenMicNight
506
- OutdoorActivity
507
- OutdoorConcert
508
- OutdoorMovieNight_WithAProjector
509
- Parade
510
- Party
511
- PoolParty
512
- Potluck
513
- PotluckVegan
514
- PreParty
515
- ProductLaunch
516
- ProfessionalNetworkingEvent
517
- Rave_General
518
- RetirementCelebration
519
- Reunion_FamilyOrSchoolOrFriends
520
- SafariAdventureParty
521
- SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
522
- ScienceFictionThemedParty
523
- SocialClubEvent
524
- SportsTournament
525
- SportsWatchParty
526
- SuperheroThemedParty
527
- SurfCompetition
528
- ThanksgivingDinner
529
- ThemedCostumeParty
530
- ThemedDinnerParty
531
- ThemedPubCrawl
532
- Tournament
533
- TravelAndTradeShow
534
- TriviaNight
535
- ValentinesDayParty
536
- WeddingReception
537
- WelcomeHomeParty
538
- WellnessFestival
539
- WineTastingEvent
540
- Other
541
- }
542
-
543
- model CustomBashEventType {
544
- id String @id @default(cuid())
545
- key String @unique
546
- displayName String
547
- }
548
-
549
- model AmountOfGuests {
550
- id String @id @default(cuid())
551
- bashEvent BashEvent?
552
- exhibitor Exhibitor?
553
- eventService EventService?
554
- entertainmentService EntertainmentService?
555
- vendor Vendor?
556
- sponsor Sponsor?
557
-
558
- minimum Int? @default(10)
559
- ideal Int? @default(35)
560
- showMinimumGuests Boolean @default(true)
561
- showIdealGuests Boolean @default(true)
562
- venueId String?
563
- organizationId String?
564
- }
565
-
566
- enum Privacy {
567
- Public
568
- ConnectionsOnly
569
- InviteOnly
570
- }
571
-
572
- model TargetAudience {
573
- id String @id @default(cuid())
574
- ageRange AgeRange[]
575
- secondaryAgeRange AgeRange[]
576
- gender Gender[]
577
- secondaryGender Gender[]
578
- occupation Occupation[]
579
- secondaryOccupation Occupation[]
580
- education Education[]
581
- secondaryEducation Education[]
582
- showOnDetailPage Boolean @default(true)
583
- bashEvent BashEvent?
584
- service Service?
585
- }
586
-
587
- enum AgeRange {
588
- Sixteen_17
589
- Eighteen_20
590
- TwentyOne_25
591
- TwentySix_34
592
- ThirtyFive_49
593
- Fifty_64
594
- SixtyFivePlus
595
- NoPreference
596
- }
597
-
598
- enum Occupation {
599
- Students
600
- Entrepreneurs
601
- SmallBusinesses
602
- Corporations
603
- Professionals
604
- Creatives
605
- AngelInvestors
606
- FamilyOffices
607
- Retirees
608
- Academics
609
- Government
610
- NonProfits
611
- NoPreference
612
- }
613
-
614
- enum Education {
615
- HighSchool
616
- SomeCollege
617
- InCollege
618
- Bachelors
619
- GraduateStudent
620
- Masters
621
- Doctorate
622
- NoPreference
623
- }
624
-
625
- enum BashStatus {
626
- Draft
627
- PreSale
628
- Published
629
- }
630
-
631
- enum ServiceStatus {
632
- Draft
633
- Created
634
- }
635
-
636
- enum ServiceCondition {
637
- Pending
638
- Published
639
- Suspended
640
- Deactivated
641
- }
642
-
643
- enum VolunteerServiceStatus {
644
- Draft
645
- Pending
646
- Created
647
- }
648
-
649
- model DocumentID {
650
- id String @id @default(cuid())
651
- givenName String?
652
- familyName String?
653
- middleName String?
654
- suffix String?
655
- street String?
656
- city String?
657
- state String?
658
- stateName String?
659
- zipCode String?
660
- idNumber String?
661
- expires String?
662
- dob String?
663
- issueDate String?
664
- idType String?
665
- userId String? @unique
666
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
667
- }
668
-
669
- model EventLink {
670
- id String @id @default(cuid())
671
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
672
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
673
- linkId String
674
- bashEventId String
675
- }
676
-
677
- enum Gender {
678
- Male
679
- Female
680
- Other
681
- NoPreference
682
- }
683
-
684
- model Investment {
685
- id String @id @default(cuid())
686
- investorId String
687
- bashEventId String
688
- investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
689
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
690
- amount Float
691
- type InvestmentType
692
- paidOn String?
693
- }
694
-
695
- enum InvestmentType {
696
- Equity
697
- Event
698
- }
699
-
700
- model Link {
701
- id String @id @default(cuid())
702
- url String
703
- type String?
704
- icon String?
705
- eventLinks EventLink[]
706
- userLinks UserLink[]
707
- serviceLinks ServiceLink[]
708
- volunteerServiceId String?
709
- volunteerService VolunteerService? @relation("VolunteerServiceLinks", fields: [volunteerServiceId], references: [id])
710
- }
711
-
712
- model Media {
713
- id String @id @default(cuid())
714
- url String @unique
715
- type MediaType
716
- mimetype String?
717
- bashEventsReferencingMe BashEvent[]
718
- sponsoredEventsReferencingMe SponsoredEvent[]
719
- serviceReferencingMe Service[]
720
- volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
721
- volunteerServiceId String?
722
-
723
- stripeAccount StripeAccount[]
724
- serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
725
- serviceRatesAssociationId String?
726
- }
727
-
728
- enum MediaType {
729
- Unknown
730
- Empty
731
- Image
732
- Video
733
- }
734
-
735
- model Prize {
736
- id String @id @default(cuid())
737
- prizeWorth Float?
738
- prizeType PrizeType
739
- name String
740
- prizeLevel Int
741
- description String
742
- competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
743
- competitionId String?
744
- paidOn String?
745
- winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
746
- winnerUserId String?
747
- }
748
-
749
- enum PrizeType {
750
- Monetary
751
- Merchandise
752
- Service
753
- Combo
754
- }
755
-
756
- model Review {
757
- id String @id @default(cuid())
758
- rating Int
759
- creatorId String
760
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
761
- bashEventId String
762
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
763
- comments BashComment[]
764
- }
765
-
766
- model GoogleReview {
767
- id String @id @default(cuid())
768
- author_name String?
769
- rating Float
770
- text String?
771
- createdAt DateTime @default(now())
772
- serviceId String
773
- // service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
774
- }
775
-
776
- model Session {
777
- id String @id @default(cuid())
778
- sessionToken String @unique
779
- userId String
780
- expires DateTime
781
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
782
-
783
- @@index([userId])
784
- }
785
-
786
- enum Sex {
787
- Male
788
- Female
789
- Other
790
- }
791
-
792
- model SponsoredEvent {
793
- id String @id @default(cuid())
794
- amount Float?
795
- paidOn String?
796
- sponsorType SponsorType
797
- sponsorId String
798
- bashEventId String
799
- sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
800
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
801
- media Media[]
802
- }
803
-
804
- enum SponsorType {
805
- Marketing
806
- Giveaway
807
- Awareness
808
- Trade
809
- CompetitionPrizeProvider
810
- }
811
-
812
- model SocialMediaProfile {
813
- id String @id @default(uuid())
814
- platform SocialMediaPlatform
815
- url String
816
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
817
- userId String
818
-
819
- @@unique([userId, platform]) // Ensure a user cannot have multiple profiles on the same platform
820
- }
821
-
822
- enum SocialMediaPlatform {
823
- Facebook
824
- Instagram
825
- LinkedIn
826
- TikTok
827
- X
828
- YouTube
829
- Snapchat
830
- Pinterest
831
- Reddit
832
- WhatsApp
833
- Messenger
834
- Telegram
835
- Discord
836
- Clubhouse
837
- Twitch
838
- Medium
839
- BeReal
840
- Mastodon
841
- Tumblr
842
- Threads
843
- WeChat
844
- Vk
845
- Line
846
- }
847
-
848
- model User {
849
- id String @id @default(cuid())
850
- email String @unique
851
- createdOn DateTime @default(now())
852
- stripeCustomerId String? @unique
853
- stripeAccountId String? @unique
854
- isSuperUser Boolean @default(false)
855
- googleCalendarAccess String?
856
- givenName String?
857
- familyName String?
858
- hash String?
859
- emailVerified DateTime?
860
- image String?
861
- uploadedImage String?
862
- dob DateTime?
863
- gender Gender?
864
- sex Sex?
865
- roles UserRole[] @default([User])
866
- ownedServices Service[] @relation("OwnedService")
867
- createdServices Service[] @relation("CreatedService")
868
- createdEvents BashEvent[] @relation("CreatedEvent")
869
- ticketsISent Ticket[] @relation("TicketsISent")
870
- ticketsIOwn Ticket[] @relation("TicketsIOwn")
871
- reviews Review[]
872
- sponsorships SponsoredEvent[]
873
- investments Investment[]
874
- sessions Session[]
875
- eventTasks EventTask[]
876
- clubMembers ClubMember[]
877
- clubAdmins ClubAdmin[]
878
- links UserLink[]
879
- status UserStatus
880
- competitions Competition[]
881
- competitionSponsorships CompetitionSponsor[]
882
- competitionPrizes Prize[]
883
- userRatingGiven UserRatingGiven[]
884
- userRating UserRating[]
885
- magicLink String?
886
- magicLinkExpiration DateTime?
887
- magicLinkUsed DateTime?
888
- idVerified DateTime?
889
- street String?
890
- city String?
891
- state String?
892
- zipCode String?
893
- country String? @default("US")
894
- phone String?
895
- socialMediaProfiles SocialMediaProfile[]
896
- documentIDId String? @unique
897
- documentID DocumentID?
898
- comment BashComment[]
899
- associatedBashes AssociatedBash[]
900
- associatedServices AssociatedService[]
901
- invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
902
- invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
903
- notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
904
- remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
905
- remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
906
- eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
907
- checkouts Checkout[]
908
- ticketTiersWaitListsIveJoined TicketTier[]
909
- contacts Contact[]
910
- bashEventPromoCodesIUsed BashEventPromoCode[]
911
- serviceCheckouts ServiceCheckout[]
912
- bookingForMe Booking[]
913
- userSubscription UserSubscription?
914
- serviceSubcriptions ServiceSubscription[]
915
- volunteerService VolunteerService[]
916
- stripeAccounts StripeAccount[]
917
- ServicePromoCodeRedemption ServicePromoCodeRedemption[]
918
- }
919
-
920
- model Contact {
921
- id String @id @default(cuid())
922
- contactOwnerId String
923
- contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
924
- contactEmail String?
925
- fullName String?
926
- phone String?
927
- requestToConnectSent DateTime?
928
- requestToConnectAccepted DateTime?
929
-
930
- @@unique([contactOwnerId, contactEmail])
931
- @@index([contactEmail])
932
- }
933
-
934
- // anyone that is invited to the bash, is an organizer of a bash, and or the creator/owner of the bash...for having others (including services) edit or post about a bash in the bashfeed
935
- model AssociatedBash {
936
- id String @id @default(cuid())
937
- bashEventId String
938
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
939
- invitationId String? @unique
940
- invitation Invitation? @relation(fields: [invitationId], references: [id])
941
- ownerEmail String?
942
- ownerUserId String?
943
- owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
944
- isOrganizer Boolean?
945
- isFavorite Boolean?
946
- service Service[]
947
-
948
- @@unique([ownerEmail, bashEventId])
949
- }
950
-
951
- // anyone that is invited to be an organizer of a service profile or is the creator/owner...for having others edit or post about a service in the bashfeed (but the service must be associated with a bash to post)
952
- model AssociatedService {
953
- id String @id @default(cuid())
954
- serviceId String
955
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
956
- // referralId String? @unique
957
- // referral Referral? @relation(fields: [referralId], references: [id])
958
- ownerEmail String?
959
- ownerUserId String?
960
- owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
961
- isOrganizer Boolean?
962
- isFavorite Boolean?
963
-
964
- @@unique([ownerEmail, serviceId])
965
- }
966
-
967
- enum ServiceCancelationPolicy {
968
- None
969
- VeryFlexible
970
- Flexible
971
- Standard90Day
972
- Standard30Day
973
- }
974
-
975
- model ServiceSubscription {
976
- id String @id @default(cuid())
977
- ownerId String
978
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
979
- slots Int @default(0)
980
- stripeSubscriptionId String?
981
- }
982
-
983
- model ServiceListingSubscription {
984
- id String @id @default(cuid())
985
- stripeAccountId String
986
- stripeAccount StripeAccount @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict, onUpdate: Restrict)
987
- stripeCheckoutSessionId String? @unique
988
- stripeSubscriptionId String? @unique
989
-
990
- subscriptionStatus ServiceSubscriptionStatus @default(None)
991
-
992
- serviceId String @unique
993
- service Service @relation(fields: [serviceId], references: [id], onDelete: Restrict)
994
-
995
- @@index([stripeCheckoutSessionId, stripeSubscriptionId])
996
- }
997
-
998
- // Common data for all services; 1-1 relation between each individual service model such as Venue
999
- model Service {
1000
- id String @id @default(cuid())
1001
-
1002
- serviceType ServiceTypes?
1003
- serviceStatus ServiceStatus @default(Draft)
1004
- serviceCondition ServiceCondition @default(Pending)
1005
-
1006
- // current owner
1007
- ownerId String?
1008
- owner User? @relation("OwnedService", fields: [ownerId], references: [id])
1009
-
1010
- // original creator
1011
- creatorId String?
1012
- creator User? @relation("CreatedService", fields: [creatorId], references: [id])
1013
-
1014
- createdAt DateTime @default(now())
1015
- updatedAt DateTime? @updatedAt
1016
-
1017
- associatedBashesReferencingMe AssociatedBash[]
1018
- associatedServicesReferencingMe AssociatedService[]
1019
-
1020
- serviceName String?
1021
- tagline String?
1022
-
1023
- // this is not the business info but that which is associated with the service
1024
- place String?
1025
- googlePlaceId String?
1026
- street String?
1027
- city String?
1028
- state String?
1029
- zipCode String?
1030
- country String?
1031
- description String?
1032
- // email String?
1033
- // phone String?
1034
-
1035
- pocName String?
1036
- pocPhoneNumber String?
1037
- pocBusinessEmail String?
1038
-
1039
- additionalInfo String?
1040
- coverPhoto String?
1041
-
1042
- mission String?
1043
- communityInvolvement String?
1044
- emergencyContact String?
1045
- contactDetails String?
1046
- // rates Rate[] @relation("MultipleRates")
1047
- cancellationPolicy ServiceCancelationPolicy? @default(None)
1048
- // refundPolicy String?
1049
- // insurancePolicy String?
1050
- // hoursOfOperation Json? @default("{}")
1051
-
1052
- displayGoogleReviewsOnDetailPage Boolean @default(true)
1053
- displayBashReviewsOnDetailPage Boolean @default(true)
1054
-
1055
- stripeAccountId String?
1056
- stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict)
1057
-
1058
- serviceListingSubscription ServiceListingSubscription?
1059
-
1060
- targetAudienceId String? @unique
1061
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
1062
-
1063
- visibility VisibilityPreference @default(Public)
1064
-
1065
- bashesNotInterestedIn BashEventType[]
1066
- bookings Booking[]
1067
- media Media[]
1068
- serviceLinks ServiceLink[]
1069
-
1070
- volunteerServiceId String?
1071
- volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
1072
- eventService EventService?
1073
- entertainmentService EntertainmentService?
1074
- vendor Vendor?
1075
- exhibitor Exhibitor?
1076
- sponsor Sponsor?
1077
- venue Venue?
1078
- organization Organization?
1079
-
1080
- serviceRatesAssociation ServiceRatesAssociation?
1081
-
1082
- // googleReviews GoogleReview[]
1083
-
1084
- bashEvent BashEvent[] // because a service needs to be associated with a bash to post to the bashfeed
1085
- servicePromoCodeRedemption ServicePromoCodeRedemption[]
1086
- }
1087
-
1088
- model StripeAccount {
1089
- id String @id @default(cuid())
1090
-
1091
- ownerId String
1092
- owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict)
1093
-
1094
- stripeAccountId String @unique
1095
- stripeCustomerId String? @unique
1096
-
1097
- logoId String?
1098
- logo Media? @relation(fields: [logoId], references: [id], onDelete: SetNull)
1099
-
1100
- createdAt DateTime @default(now())
1101
- updatedAt DateTime @updatedAt
1102
-
1103
- service Service[]
1104
- ServiceListingSubscription ServiceListingSubscription[]
1105
-
1106
- @@index([ownerId])
1107
- }
1108
-
1109
- model VolunteerService {
1110
- id String @id @default(cuid())
1111
- // service Service
1112
- userId String?
1113
- user User? @relation(fields: [userId], references: [id])
1114
- serviceRangeId String?
1115
- serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1116
- links Link[] @relation("VolunteerServiceLinks")
1117
- // availableDateTimes ServiceAvailability[] @relation("AvailableDateTimes")
1118
- fullName String?
1119
- address String?
1120
- email String?
1121
- phone String?
1122
- agreedToAgreement Boolean? @default(false)
1123
- description String?
1124
- status VolunteerServiceStatus?
1125
- media Media[]
1126
-
1127
- serviceRatesAssociation ServiceRatesAssociation?
1128
-
1129
- service Service[]
1130
- }
1131
-
1132
- model EventService {
1133
- id String @id @default(cuid())
1134
- serviceId String @unique
1135
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1136
- serviceRangeId String?
1137
- serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1138
- eventServiceTypes EventServiceType[]
1139
- eventServiceSubType String?
1140
- yearsOfExperience YearsOfExperience
1141
- crowdSizeId String? @unique
1142
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1143
- goodsOrServices String[]
1144
- menuItems String?
1145
- venueTypes String[]
1146
- secondaryVenueTypes String[] @default([])
1147
- }
1148
-
1149
- model EntertainmentService {
1150
- id String @id @default(cuid())
1151
- serviceId String @unique
1152
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1153
- serviceRangeId String?
1154
- serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1155
- entertainmentServiceTypes EntertainmentServiceType[]
1156
- entertainmentServiceSubType String?
1157
- genre MusicGenreType?
1158
- yearsOfExperience YearsOfExperience
1159
- crowdSizeId String? @unique
1160
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1161
- goodsOrServices String[]
1162
- venueTypes String[]
1163
- secondaryVenueTypes String[] @default([])
1164
- }
1165
-
1166
- model Vendor {
1167
- id String @id @default(cuid())
1168
- serviceId String @unique
1169
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1170
- serviceRangeId String?
1171
- serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1172
- yearsOfExperience YearsOfExperience
1173
- crowdSizeId String? @unique
1174
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1175
- goodsOrServices String[]
1176
- menuItems String?
1177
- venueTypes String[]
1178
- secondaryVenueTypes String[] @default([])
1179
- }
1180
-
1181
- model Exhibitor {
1182
- id String @id @default(cuid())
1183
- serviceId String @unique
1184
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1185
- serviceRangeId String?
1186
- serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1187
- yearsOfExperience YearsOfExperience
1188
- crowdSizeId String? @unique
1189
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1190
- goodsOrServices String[]
1191
- venueTypes String[]
1192
- secondaryVenueTypes String[] @default([])
1193
- }
1194
-
1195
- model Sponsor {
1196
- id String @id @default(cuid())
1197
- serviceId String @unique
1198
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1199
- serviceRangeId String?
1200
- serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1201
- yearsOfExperience YearsOfExperience
1202
- crowdSizeId String? @unique
1203
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1204
- goodsOrServices String[]
1205
- menuItems String?
1206
- }
1207
-
1208
- model Venue {
1209
- id String @id @default(cuid())
1210
- serviceId String @unique
1211
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1212
- // serviceConnectionId String? //Check: ?
1213
- // serviceConnection String?
1214
- yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1215
- amenities String[]
1216
- menuItems String?
1217
- features String[]
1218
- venueTypes String[]
1219
- secondaryVenueTypes String[] @default([])
1220
- pitch String?
1221
- capacity Int?
1222
- anticipatedAttendees Int?
1223
- trademark Boolean?
1224
- manager Boolean?
1225
- allowed String?
1226
- notAllowed String?
1227
- vibe String?
1228
- dress String?
1229
-
1230
- pricingPlan VenuePricingPlan?
1231
- // subscriptionStatus SubscriptionStatus?
1232
- // subscriptionStartDate DateTime?
1233
-
1234
- bashEvents BashEvent[]
1235
- }
1236
-
1237
- model ServicePromoCodeRedemption {
1238
- id String @id @default(cuid())
1239
- serviceId String?
1240
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1241
-
1242
- userId String?
1243
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
1244
-
1245
- code String
1246
- stripeCouponId String
1247
- redemptionCount Int
1248
-
1249
- lastRedeemedOn DateTime
1250
- }
1251
-
1252
- // model VenuePricing {
1253
- // id String @id @default(cuid())
1254
- // venuePricingPlan VenuePricingPlan
1255
- // percentageRate Float? @default(0.15)
1256
- // }
1257
-
1258
- enum VenuePricingPlan {
1259
- Percentage
1260
- Subscription
1261
- }
1262
-
1263
- enum ServiceSubscriptionStatus {
1264
- None
1265
- Active
1266
- Trialing
1267
- Paused
1268
- Canceled
1269
- Incomplete
1270
- IncompleteExpired
1271
- Unpaid
1272
- PastDue
1273
- Suspended
1274
- Expired
1275
- }
1276
-
1277
- model Organization {
1278
- id String @id @default(cuid())
1279
- serviceId String @unique
1280
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1281
- organizationType OrganizationType[]
1282
- goodsOrServices String[]
1283
- venueTypes String[]
1284
- secondaryVenueTypes String[] @default([])
1285
- }
1286
-
1287
- enum EventServiceType {
1288
- Investor
1289
- LongTermLoan
1290
- ShortTermLoan
1291
- EventPlanning
1292
- Caterer
1293
- Cleaner
1294
- Decorator
1295
- InteriorDesigner
1296
- RentalEquipmentProvider
1297
- FoodAndBeverageProvider
1298
- MediaCapture
1299
- AVTechnician
1300
- GraphicDesigner
1301
- Influencer
1302
- Promoter
1303
- CelebrityAppearance
1304
- CrewHand
1305
- EventManager
1306
- VirtualAssistant
1307
- Consulting
1308
- Transportation
1309
- }
1310
-
1311
- enum EntertainmentServiceType {
1312
- Emcees
1313
- DJs
1314
- Bands
1315
- SoloMusicians
1316
- Comedy
1317
- VarietyActs
1318
- PerformanceArtists
1319
- Magic
1320
- Dancers
1321
- Aerialists
1322
- Impersonators
1323
- Speakers
1324
- Auctioneers
1325
- }
1326
-
1327
- enum OrganizationType {
1328
- Church
1329
- GreekLife
1330
- SocialClub
1331
- Nonprofit
1332
- Corporation
1333
- EducationalInstitution
1334
- Sports
1335
- Government
1336
- Cultural
1337
- Lifestyle
1338
- Political
1339
- Tourism
1340
- Youth
1341
- Senior
1342
- Tradeshow
1343
- Conference
1344
- FoodAndBeverage
1345
- TechAndStartups
1346
- }
1347
-
1348
- enum YearsOfExperience {
1349
- LessThanOneYear
1350
- OneToThreeYears
1351
- ThreeToFiveYears
1352
- FivePlusYears
1353
- }
1354
-
1355
- model ServiceRange {
1356
- id String @id @default(cuid())
1357
- min Int @default(0)
1358
- max Int @default(50)
1359
- volunteerServices VolunteerService[]
1360
- entertainmentServices EntertainmentService[]
1361
- EventService EventService[]
1362
- Vendor Vendor[]
1363
- Exhibitor Exhibitor[]
1364
- Sponsor Sponsor[]
1365
- }
1366
-
1367
- // model Availability {
1368
- // id String @id @default(cuid())
1369
- // dayOfWeek Int
1370
- // startDateTime DateTime @db.Time
1371
- // endDateTime DateTime @db.Time
1372
- // // Rate Rate? @relation(fields: [rateId], references: [id])
1373
- // rateId String?
1374
- // }
1375
-
1376
- // model Rate {
1377
- // id String @id @default(cuid())
1378
- // serviceMultipleRatesId String?
1379
- // serviceMultipleRates Service? @relation("MultipleRates", fields: [serviceMultipleRatesId], references: [id], onDelete: Cascade)
1380
- // bashEventId String?
1381
- // bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
1382
- // waitList User[]
1383
- // price Int @default(0)
1384
- // title String @default("Free")
1385
- // sortOrder Int?
1386
- // description String?
1387
- // maximumNumberOfHours Int @default(24)
1388
- // maximumHourCount Int @default(24)
1389
- // isDonationTier Boolean?
1390
- // hidden Boolean?
1391
- // Availability Availability[]
1392
-
1393
- // // promoCodes BashEventPromoCode[]
1394
- // @@unique([bashEventId, title])
1395
- // }
1396
-
1397
- // model ServiceRate {
1398
- // id String @id @default(cuid())
1399
- // rateType ServiceRateType
1400
- // rate Int?
1401
- // ServiceSpecialRates ServiceSpecialRates[]
1402
- // }
1403
-
1404
- // model ServiceGeneralRates {
1405
- // id String @id @default(cuid())
1406
-
1407
- // serviceRateId String?
1408
- // serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
1409
-
1410
- // // generalHourlyRate Int
1411
- // // generalDailyRate Int
1412
- // // generalWeeklyRate Int
1413
- // // generalMonthlyRate Int
1414
- // }
1415
-
1416
- enum ServiceRateType {
1417
- General
1418
- Weekday
1419
- Special
1420
- // CLOSED
1421
- // HOURLY
1422
- // DAILY
1423
- // WEEKLY
1424
- }
1425
-
1426
- //can optionally be associated with a package
1427
- model ServiceAddon {
1428
- id String @id @default(cuid())
1429
- name String
1430
- description String
1431
- price Int?
1432
- quantity Int
1433
-
1434
- servicePackage ServicePackage? @relation(fields: [servicePackageId], references: [id], onDelete: Cascade)
1435
- servicePackageId String?
1436
-
1437
- serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1438
- serviceRatesAssociationId String?
1439
- }
1440
-
1441
- model ServicePackage {
1442
- id String @id @default(cuid())
1443
- name String
1444
- description String
1445
- price Int
1446
-
1447
- serviceAddons ServiceAddon[]
1448
-
1449
- serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1450
- serviceRatesAssociationId String?
1451
- }
1452
-
1453
- model ServiceRate {
1454
- id String @id @default(cuid())
1455
- rateType ServiceRateType
1456
- hourlyRate Int?
1457
- dailyRate Int?
1458
- cleaningFeePerBooking Int?
1459
- minimumTimeBlockHours Int?
1460
- serviceSpecialRates ServiceSpecialRates?
1461
- serviceDailyRates ServiceDailyRates?
1462
- serviceRatesAssociation ServiceRatesAssociation?
1463
-
1464
- @@index([rateType])
1465
- }
1466
-
1467
- // if isAvailable is false it is closed
1468
- model ServiceSpecialRates {
1469
- id String @id @default(cuid())
1470
- startDate DateTime @db.Date
1471
- endDate DateTime @db.Date
1472
-
1473
- serviceRateId String?
1474
- serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
1475
- isAvailable Boolean
1476
-
1477
- serviceRatesAssociationId String
1478
- serviceRatesAssociation ServiceRatesAssociation @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1479
-
1480
- @@unique([serviceRateId])
1481
- }
1482
-
1483
- // different days of the week have different rates
1484
- // can block of certain dates of the year and days of the week as being closed
1485
- // can have special rates on different days of the year (single or range)
1486
- // free trial period with promo code (1 or 2 months of listing for free)
1487
- model ServiceDailyRates {
1488
- id String @id @default(cuid())
1489
- dayOfWeek DayOfWeek
1490
- startTime DateTime @db.Time
1491
- endTime DateTime @db.Time
1492
-
1493
- serviceRateId String?
1494
- serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
1495
-
1496
- serviceRatesAssociationId String
1497
- serviceRatesAssociation ServiceRatesAssociation @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1498
-
1499
- @@unique([serviceRateId])
1500
- }
1501
-
1502
- model ServiceRatesAssociation {
1503
- id String @id @default(cuid())
1504
-
1505
- serviceId String?
1506
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1507
- volunteerServiceId String?
1508
- volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id], onDelete: Cascade)
1509
-
1510
- serviceGeneralRatesId String?
1511
- serviceGeneralRates ServiceRate? @relation(fields: [serviceGeneralRatesId], references: [id], onDelete: Cascade)
1512
-
1513
- serviceDailyRates ServiceDailyRates[]
1514
- serviceSpecialRates ServiceSpecialRates[]
1515
-
1516
- addons ServiceAddon[]
1517
- packages ServicePackage[]
1518
-
1519
- media Media[]
1520
-
1521
- @@unique([serviceId])
1522
- @@unique([volunteerServiceId])
1523
- @@unique([serviceGeneralRatesId])
1524
- }
1525
-
1526
- enum VisibilityPreference {
1527
- Public
1528
- Private
1529
- }
1530
-
1531
- enum MusicGenreType {
1532
- Classical
1533
- Rock
1534
- HipHop
1535
- Country
1536
- Pop
1537
- EDM
1538
- Indie
1539
- Acoustic
1540
- }
1541
-
1542
- enum UserRole {
1543
- User
1544
- Vendor
1545
- Sponsor
1546
- Investor
1547
- LoanProvider
1548
- VenueProvider
1549
- ServiceProvider
1550
- SuperAdmin
1551
- Exhibitor
1552
- }
1553
-
1554
- model UserLink {
1555
- id String @id @default(cuid())
1556
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1557
- linkId String
1558
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1559
- userId String
1560
- }
1561
-
1562
- model UserRating {
1563
- id String @id @default(cuid())
1564
- rating Int
1565
- comment String?
1566
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1567
- userRatingGivenId String
1568
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1569
- userId String
1570
- }
1571
-
1572
- model UserRatingGiven {
1573
- id String @id @default(cuid())
1574
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1575
- userId String
1576
- UserRating UserRating[]
1577
- }
1578
-
1579
- enum UserStatus {
1580
- Active
1581
- Inactive
1582
- Suspended
1583
- Deactivated
1584
- }
1585
-
1586
- model VerificationToken {
1587
- identifier String
1588
- token String @unique
1589
- expires DateTime
1590
-
1591
- @@unique([identifier, token])
1592
- }
1593
-
1594
- model ServiceLink {
1595
- id String @id @default(cuid())
1596
- serviceId String
1597
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1598
- linkId String
1599
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1600
-
1601
- @@index([serviceId])
1602
- }
1603
-
1604
- enum ServiceTypes {
1605
- EventServices
1606
- EntertainmentServices
1607
- Vendors
1608
- Exhibitors
1609
- Sponsors
1610
- Venues
1611
- Organizations
1612
- }
1613
-
1614
- enum EntityType {
1615
- EVENT_SERVICE
1616
- ENTERTAINMENT_SERVICE
1617
- VENDOR
1618
- EXHIBITOR
1619
- SPONSOR
1620
- VENUE
1621
- ORGANIZATION
1622
- BASH_EVENT // For BashEvents
1623
- }
1
+ // This is your Prisma schema file,
2
+ // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
+
4
+ generator client {
5
+ provider = "prisma-client-js"
6
+ }
7
+
8
+ datasource db {
9
+ provider = "postgresql"
10
+ url = env("POSTGRES_PRISMA_URL") // uses connection pooling
11
+ directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
12
+ }
13
+
14
+ model Club {
15
+ id String @id @default(cuid())
16
+ name String
17
+ street String
18
+ userId String
19
+ price Int?
20
+ events BashEvent[]
21
+ members ClubMember[]
22
+ admin ClubAdmin[]
23
+ }
24
+
25
+ model ClubAdmin {
26
+ id String @id @default(cuid())
27
+ admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
28
+ userId String
29
+ club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
30
+ clubId String
31
+ role ClubAdminRole
32
+ }
33
+
34
+ model ClubMember {
35
+ id String @id @default(cuid())
36
+ member User @relation(fields: [userId], references: [id], onDelete: Cascade)
37
+ userId String
38
+ club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
39
+ clubId String
40
+ status ClubMemberStatus
41
+ statusHistory Json
42
+ price Int?
43
+ }
44
+
45
+ enum ClubAdminRole {
46
+ Owner
47
+ Admin
48
+ Staff
49
+ }
50
+
51
+ enum ClubMemberStatus {
52
+ Active
53
+ Inactive
54
+ Canceled
55
+ Paused
56
+ Removed
57
+ }
58
+
59
+ model BashComment {
60
+ id String @id @default(cuid())
61
+ creatorId String
62
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
63
+ content String
64
+ reviewId String?
65
+ review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
66
+ bashEventId String?
67
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
68
+ parentCommentId String?
69
+ parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
70
+ replies BashComment[] @relation("CommentReplies")
71
+ }
72
+
73
+ model Competition {
74
+ id String @id @default(cuid())
75
+ name String
76
+ description String
77
+ owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
78
+ prizes Prize[]
79
+ userId String
80
+ sponser CompetitionSponsor[]
81
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
82
+ bashEventId String
83
+ numberOfPrizes Int
84
+ }
85
+
86
+ model CompetitionSponsor {
87
+ id String @id @default(cuid())
88
+ competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
89
+ sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
90
+ competitionId String
91
+ userId String
92
+ description String
93
+ paidOn String?
94
+ }
95
+
96
+ model EventTask {
97
+ id String @id @default(cuid())
98
+ creatorId String
99
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
100
+ bashEventId String
101
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
102
+ description String
103
+ assignedToId String?
104
+ assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
105
+ status TaskStatus?
106
+ bashNotificationsReferencingMe BashNotification[]
107
+ createdAt DateTime? @default(now())
108
+ }
109
+
110
+ enum TaskStatus {
111
+ Accepted
112
+ Rejected
113
+ Completed
114
+ }
115
+
116
+ model Reminder {
117
+ id String @id @default(cuid())
118
+ creatorId String
119
+ creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
120
+ remindWhoId String?
121
+ remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
122
+ remindDateTime DateTime
123
+ notificationId String
124
+ notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
125
+ }
126
+
127
+ model BashEventPromoCode {
128
+ id String @id @default(cuid())
129
+ code String
130
+ ticketTierId String
131
+ ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
132
+ stripeCouponId String?
133
+ discountAmountInCents Int?
134
+ discountAmountPercentage Int?
135
+ maxRedemptions Int?
136
+ redeemBy DateTime?
137
+ usedBy User[]
138
+
139
+ @@unique([ticketTierId, code])
140
+ }
141
+
142
+ model BashNotification {
143
+ id String @id @default(cuid())
144
+ creatorId String
145
+ creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
146
+ email String
147
+ createdDateTime DateTime @default(now())
148
+ message String
149
+ image String?
150
+ readDateTime DateTime?
151
+ taskId String?
152
+ eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
153
+ invitationId String?
154
+ invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
155
+ bashEventId String?
156
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
157
+ reminders Reminder[]
158
+ redirectUrl String?
159
+
160
+ @@unique([creatorId, email, bashEventId])
161
+ @@unique([creatorId, email, invitationId])
162
+ @@index([creatorId])
163
+ }
164
+
165
+ model Invitation {
166
+ id String @id @default(cuid())
167
+ creatorId String
168
+ creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
169
+ email String
170
+ sentToId String?
171
+ sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
172
+ bashEventId String?
173
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
174
+ image String?
175
+ phone String?
176
+ name String?
177
+ message String?
178
+ inviteDate DateTime? @default(now())
179
+ acceptedDate DateTime?
180
+ rejectedDate DateTime?
181
+ maybeDate DateTime?
182
+ tickets Ticket[] @relation("TicketsForInvitation")
183
+ bashNotifications BashNotification[]
184
+ associatedBash AssociatedBash?
185
+
186
+ @@index([email])
187
+ }
188
+
189
+ model BashEvent {
190
+ id String @id @default(cuid())
191
+ title String
192
+ creatorId String
193
+ creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
194
+ isApproved Boolean?
195
+ description String?
196
+ eventType String @default("Other")
197
+ startDateTime DateTime? @default(now())
198
+ endDateTime DateTime? @default(now())
199
+ ticketTiers TicketTier[]
200
+ targetAudienceId String? @unique
201
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
202
+ amountOfGuestsId String? @unique
203
+ amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
204
+ recurrence Recurrence?
205
+ vibe String?
206
+ occasion String?
207
+ dress String?
208
+ allowed String?
209
+ notAllowed String?
210
+ nonProfit Boolean?
211
+ nonProfitId String?
212
+ privacy Privacy @default(Public)
213
+ tickets Ticket[]
214
+ reviews Review[]
215
+ sponsorships SponsoredEvent[]
216
+ investments Investment[]
217
+ capacity Int?
218
+ location String?
219
+ status BashStatus @default(Draft)
220
+ tags String[]
221
+ coverPhoto String?
222
+ media Media[]
223
+ club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
224
+ clubId String?
225
+ links EventLink[]
226
+ competitions Competition[]
227
+ invitations Invitation[]
228
+ dateTimePublished DateTime?
229
+ comments BashComment[]
230
+ includedItems String[]
231
+ associatedBashesReferencingMe AssociatedBash[] // maybe rename later to AssociatedWithABash
232
+ associatedServicesReferencingMe Service[] // maybe rename later to AssociatedWithAService
233
+ bashNotificationsReferencingMe BashNotification[]
234
+ checkouts Checkout[]
235
+ eventTasks EventTask[]
236
+ videoLink String?
237
+ subtitle String?
238
+ isFeatured Boolean?
239
+ isTrending Boolean?
240
+ coordinates Coordinates[] // A BashEvent can have multiple sets of coordinates
241
+ // stripeAccount StripeAccount[]
242
+ // rate Rate[]
243
+ venueId String? // Nullable, meaning it's optional
244
+ venue Venue? @relation(fields: [venueId], references: [id])
245
+ }
246
+
247
+ model Coordinates {
248
+ id Int @id @default(autoincrement())
249
+ lat Float?
250
+ lng Float?
251
+ bashEventId String? // Foreign key to BashEvent, now of type String
252
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
253
+ }
254
+
255
+ model Checkout {
256
+ id String @id @default(cuid())
257
+ ownerId String
258
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
259
+ bashEventId String
260
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
261
+ checkoutDateTime DateTime? @default(now())
262
+ tickets Ticket[]
263
+ stripeCheckoutSessionId String? @unique
264
+ bookings Booking[]
265
+
266
+ @@index(bashEventId)
267
+ }
268
+
269
+ model TicketTier {
270
+ id String @id @default(cuid())
271
+ bashEventId String
272
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
273
+ tickets Ticket[]
274
+ waitList User[]
275
+ price Int @default(0) //stored multipled by 100 to allow for decimals
276
+ title String @default("Free")
277
+ sortOrder Int?
278
+ description String?
279
+ maximumNumberOfTickets Int @default(100)
280
+ maximumTicketCount Int @default(100)
281
+ isDonationTier Boolean?
282
+ hidden Boolean?
283
+ promoCodes BashEventPromoCode[]
284
+
285
+ @@unique([bashEventId, title])
286
+ }
287
+
288
+ model Ticket {
289
+ id String @id @default(cuid())
290
+ ownerId String
291
+ owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
292
+ bashEventId String
293
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
294
+ ticketTierId String?
295
+ ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
296
+ validDate DateTime?
297
+ forUserId String?
298
+ forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
299
+ fullName String?
300
+ email String?
301
+ paidOn DateTime?
302
+ allowPromiseToPay Boolean?
303
+ status TicketStatus?
304
+ isFreeGuest Boolean?
305
+ geoFenceCheckInUnnecessary Boolean?
306
+ checkedInAt DateTime?
307
+ checkedOutAt DateTime?
308
+ invitationId String?
309
+ invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
310
+ checkoutId String?
311
+ checkout Checkout? @relation(fields: [checkoutId], references: [id])
312
+ ServiceCheckout ServiceCheckout? @relation(fields: [serviceCheckoutId], references: [id])
313
+ serviceCheckoutId String?
314
+
315
+ @@index([bashEventId])
316
+ }
317
+
318
+ enum TicketStatus {
319
+ Cancelled
320
+ Attended
321
+ Missed
322
+ }
323
+
324
+ model ServiceCheckout {
325
+ id String @id @default(cuid())
326
+ ownerId String
327
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
328
+ checkoutDateTime DateTime? @default(now())
329
+ tickets Ticket[]
330
+ stripeCheckoutSessionId String? @unique
331
+ }
332
+
333
+ model UserSubscription {
334
+ id String @id @default(cuid())
335
+ ownerId String @unique
336
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
337
+ type UserSubscriptionType
338
+ }
339
+
340
+ enum UserSubscriptionType {
341
+ Free
342
+ Premium
343
+ VIP
344
+ }
345
+
346
+ enum BookingStatus {
347
+ Cancelled
348
+ Completed
349
+ Missed
350
+ }
351
+
352
+ model Booking {
353
+ id String @id @default(cuid())
354
+ serviceId String
355
+ service Service @relation(fields: [serviceId], references: [id])
356
+ validDate DateTime?
357
+ forUserId String?
358
+ forUser User? @relation(fields: [forUserId], references: [id])
359
+ fullName String?
360
+ email String?
361
+ paidOn DateTime?
362
+ requireDeposit Boolean?
363
+ status BookingStatus?
364
+ geoFenceCheckInUnnecessary Boolean?
365
+ checkedInAt DateTime?
366
+ checkedOutAt DateTime?
367
+ checkoutId String?
368
+ checkout Checkout? @relation(fields: [checkoutId], references: [id])
369
+
370
+ @@index([serviceId])
371
+ @@index([forUserId])
372
+ @@index([checkoutId])
373
+ }
374
+
375
+ model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
376
+ id String @id @default(cuid())
377
+ doNotUseVibeEnum BashEventVibeTags @default(Wild)
378
+ doNotUseDressEnum BashEventDressTags @default(Casual)
379
+ doNotUseBashEventType BashEventType @default(Other)
380
+ doNotUseDayOfWeek DayOfWeek @default(Sunday)
381
+ }
382
+
383
+ model Recurrence {
384
+ id String @id @default(cuid())
385
+ interval Int @default(1)
386
+ bashEventId String @unique
387
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
388
+ frequency RecurringFrequency @default(Never)
389
+ ends DateTime @default(now())
390
+ repeatOnDays DayOfWeek[]
391
+ repeatOnDayOfMonth Int?
392
+ repeatYearlyDate DateTime?
393
+ }
394
+
395
+ enum DayOfWeek {
396
+ Sunday
397
+ Monday
398
+ Tuesday
399
+ Wednesday
400
+ Thursday
401
+ Friday
402
+ Saturday
403
+ }
404
+
405
+ enum RecurringFrequency {
406
+ Never
407
+ Daily
408
+ Weekly
409
+ Monthly
410
+ Yearly
411
+ }
412
+
413
+ enum BashEventVibeTags {
414
+ Wild
415
+ Calm
416
+ }
417
+
418
+ enum BashEventDressTags {
419
+ Casual
420
+ BusinessCasual
421
+ Formal
422
+ }
423
+
424
+ // enum ServicesTags {
425
+ // Fast
426
+ // Reliable
427
+ // AwardRecipient
428
+ // }
429
+
430
+ enum BashEventType {
431
+ AfterParty
432
+ AnimeAndCosplayFestival
433
+ AnniversaryCelebration
434
+ ArtExhibitOpening
435
+ ArtAndCraftNight
436
+ BBQCookout
437
+ BabyShower
438
+ BachelorOrBacheloretteParty
439
+ BeachParty
440
+ Birthday
441
+ BoatPartyOrCruise
442
+ Bonfire
443
+ BookClubMeeting
444
+ BridalShower
445
+ BrunchGathering
446
+ CarShow
447
+ CarnivalAndFair
448
+ CasinoNight
449
+ CasualMixer
450
+ CharityBall
451
+ CharityFundraiser
452
+ ChristmasParty
453
+ ChurchEvent
454
+ CircusOrCarnivalParty
455
+ CocktailParty
456
+ CollegeParty_FraternityOrSorority
457
+ ComedyShowOrStandUpComedyNight
458
+ ComicConvention
459
+ Competition
460
+ Concert
461
+ CookingCompetition
462
+ CorporateEventOrOfficeParty
463
+ CostumeParty_Theme_Based
464
+ CulturalFestival
465
+ DanceParty
466
+ DesertRave
467
+ DiscoNight
468
+ EasterGathering
469
+ EngagementParty
470
+ ESportsGamingTournament
471
+ ExclusiveLuxuryRetreat
472
+ FantasyThemedParty
473
+ FashionShow
474
+ Fireside
475
+ FitnessFestival
476
+ FlashMob
477
+ Festival
478
+ FestivalFilm
479
+ FestivalFood
480
+ FundraisingEvent
481
+ GalaDinner
482
+ GameNight
483
+ GamingEvent
484
+ GardenParty
485
+ GoingAwayPartyOrFarewell
486
+ GraduationParty
487
+ HalloweenCostumeParty
488
+ HanukkahParty
489
+ HistoricalEraParty
490
+ HolidayParty
491
+ HouseParty
492
+ HousewarmingParty
493
+ KaraokeNight
494
+ KiteFlyingFestival
495
+ LiveBandPerformanceInALocalVenue
496
+ Luau
497
+ MansionParty
498
+ MardiGras
499
+ MasqueradeBall
500
+ MotorcycleRally
501
+ MovieNight
502
+ MoviePremiere
503
+ MusicFestival
504
+ NewYearsEveCelebration
505
+ OpenMicNight
506
+ OutdoorActivity
507
+ OutdoorConcert
508
+ OutdoorMovieNight_WithAProjector
509
+ Parade
510
+ Party
511
+ PoolParty
512
+ Potluck
513
+ PotluckVegan
514
+ PreParty
515
+ ProductLaunch
516
+ ProfessionalNetworkingEvent
517
+ Rave_General
518
+ RetirementCelebration
519
+ Reunion_FamilyOrSchoolOrFriends
520
+ SafariAdventureParty
521
+ SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
522
+ ScienceFictionThemedParty
523
+ SocialClubEvent
524
+ SportsTournament
525
+ SportsWatchParty
526
+ SuperheroThemedParty
527
+ SurfCompetition
528
+ ThanksgivingDinner
529
+ ThemedCostumeParty
530
+ ThemedDinnerParty
531
+ ThemedPubCrawl
532
+ Tournament
533
+ TravelAndTradeShow
534
+ TriviaNight
535
+ ValentinesDayParty
536
+ WeddingReception
537
+ WelcomeHomeParty
538
+ WellnessFestival
539
+ WineTastingEvent
540
+ Other
541
+ }
542
+
543
+ model CustomBashEventType {
544
+ id String @id @default(cuid())
545
+ key String @unique
546
+ displayName String
547
+ }
548
+
549
+ model AmountOfGuests {
550
+ id String @id @default(cuid())
551
+ bashEvent BashEvent?
552
+ exhibitor Exhibitor?
553
+ eventService EventService?
554
+ entertainmentService EntertainmentService?
555
+ vendor Vendor?
556
+ sponsor Sponsor?
557
+
558
+ minimum Int? @default(10)
559
+ ideal Int? @default(35)
560
+ showMinimumGuests Boolean @default(true)
561
+ showIdealGuests Boolean @default(true)
562
+ venueId String?
563
+ organizationId String?
564
+ }
565
+
566
+ enum Privacy {
567
+ Public
568
+ ConnectionsOnly
569
+ InviteOnly
570
+ }
571
+
572
+ model TargetAudience {
573
+ id String @id @default(cuid())
574
+ ageRange AgeRange[]
575
+ secondaryAgeRange AgeRange[]
576
+ gender Gender[]
577
+ secondaryGender Gender[]
578
+ occupation Occupation[]
579
+ secondaryOccupation Occupation[]
580
+ education Education[]
581
+ secondaryEducation Education[]
582
+ showOnDetailPage Boolean @default(true)
583
+ bashEvent BashEvent?
584
+ service Service?
585
+ }
586
+
587
+ enum AgeRange {
588
+ Sixteen_17
589
+ Eighteen_20
590
+ TwentyOne_25
591
+ TwentySix_34
592
+ ThirtyFive_49
593
+ Fifty_64
594
+ SixtyFivePlus
595
+ NoPreference
596
+ }
597
+
598
+ enum Occupation {
599
+ Students
600
+ Entrepreneurs
601
+ SmallBusinesses
602
+ Corporations
603
+ Professionals
604
+ Creatives
605
+ AngelInvestors
606
+ FamilyOffices
607
+ Retirees
608
+ Academics
609
+ Government
610
+ NonProfits
611
+ NoPreference
612
+ }
613
+
614
+ enum Education {
615
+ HighSchool
616
+ SomeCollege
617
+ InCollege
618
+ Bachelors
619
+ GraduateStudent
620
+ Masters
621
+ Doctorate
622
+ NoPreference
623
+ }
624
+
625
+ enum BashStatus {
626
+ Draft
627
+ PreSale
628
+ Published
629
+ }
630
+
631
+ enum ServiceStatus {
632
+ Draft
633
+ Created
634
+ }
635
+
636
+ enum ServiceCondition {
637
+ Pending
638
+ Published
639
+ Suspended
640
+ Deactivated
641
+ }
642
+
643
+ enum VolunteerServiceStatus {
644
+ Draft
645
+ Pending
646
+ Created
647
+ }
648
+
649
+ model DocumentID {
650
+ id String @id @default(cuid())
651
+ givenName String?
652
+ familyName String?
653
+ middleName String?
654
+ suffix String?
655
+ street String?
656
+ city String?
657
+ state String?
658
+ stateName String?
659
+ zipCode String?
660
+ idNumber String?
661
+ expires String?
662
+ dob String?
663
+ issueDate String?
664
+ idType String?
665
+ userId String? @unique
666
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
667
+ }
668
+
669
+ model EventLink {
670
+ id String @id @default(cuid())
671
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
672
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
673
+ linkId String
674
+ bashEventId String
675
+ }
676
+
677
+ enum Gender {
678
+ Male
679
+ Female
680
+ Other
681
+ NoPreference
682
+ }
683
+
684
+ model Investment {
685
+ id String @id @default(cuid())
686
+ investorId String
687
+ bashEventId String
688
+ investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
689
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
690
+ amount Float
691
+ type InvestmentType
692
+ paidOn String?
693
+ }
694
+
695
+ enum InvestmentType {
696
+ Equity
697
+ Event
698
+ }
699
+
700
+ model Link {
701
+ id String @id @default(cuid())
702
+ url String
703
+ type String?
704
+ icon String?
705
+ eventLinks EventLink[]
706
+ userLinks UserLink[]
707
+ serviceLinks ServiceLink[]
708
+ volunteerServiceId String?
709
+ volunteerService VolunteerService? @relation("VolunteerServiceLinks", fields: [volunteerServiceId], references: [id])
710
+ }
711
+
712
+ model Media {
713
+ id String @id @default(cuid())
714
+ url String @unique
715
+ type MediaType
716
+ mimetype String?
717
+ bashEventsReferencingMe BashEvent[]
718
+ sponsoredEventsReferencingMe SponsoredEvent[]
719
+ serviceReferencingMe Service[]
720
+ volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
721
+ volunteerServiceId String?
722
+
723
+ stripeAccount StripeAccount[]
724
+ serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
725
+ serviceRatesAssociationId String?
726
+ }
727
+
728
+ enum MediaType {
729
+ Unknown
730
+ Empty
731
+ Image
732
+ Video
733
+ }
734
+
735
+ model Prize {
736
+ id String @id @default(cuid())
737
+ prizeWorth Float?
738
+ prizeType PrizeType
739
+ name String
740
+ prizeLevel Int
741
+ description String
742
+ competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
743
+ competitionId String?
744
+ paidOn String?
745
+ winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
746
+ winnerUserId String?
747
+ }
748
+
749
+ enum PrizeType {
750
+ Monetary
751
+ Merchandise
752
+ Service
753
+ Combo
754
+ }
755
+
756
+ model Review {
757
+ id String @id @default(cuid())
758
+ rating Int
759
+ creatorId String
760
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
761
+ bashEventId String
762
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
763
+ comments BashComment[]
764
+ }
765
+
766
+ model GoogleReview {
767
+ id String @id @default(cuid())
768
+ author_name String?
769
+ rating Float
770
+ text String?
771
+ createdAt DateTime @default(now())
772
+ serviceId String
773
+ // service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
774
+ }
775
+
776
+ model Session {
777
+ id String @id @default(cuid())
778
+ sessionToken String @unique
779
+ userId String
780
+ expires DateTime
781
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
782
+
783
+ @@index([userId])
784
+ }
785
+
786
+ enum Sex {
787
+ Male
788
+ Female
789
+ Other
790
+ }
791
+
792
+ model SponsoredEvent {
793
+ id String @id @default(cuid())
794
+ amount Float?
795
+ paidOn String?
796
+ sponsorType SponsorType
797
+ sponsorId String
798
+ bashEventId String
799
+ sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
800
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
801
+ media Media[]
802
+ }
803
+
804
+ enum SponsorType {
805
+ Marketing
806
+ Giveaway
807
+ Awareness
808
+ Trade
809
+ CompetitionPrizeProvider
810
+ }
811
+
812
+ model SocialMediaProfile {
813
+ id String @id @default(uuid())
814
+ platform SocialMediaPlatform
815
+ url String
816
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
817
+ userId String
818
+
819
+ @@unique([userId, platform]) // Ensure a user cannot have multiple profiles on the same platform
820
+ }
821
+
822
+ enum SocialMediaPlatform {
823
+ Facebook
824
+ Instagram
825
+ LinkedIn
826
+ TikTok
827
+ X
828
+ YouTube
829
+ Snapchat
830
+ Pinterest
831
+ Reddit
832
+ WhatsApp
833
+ Messenger
834
+ Telegram
835
+ Discord
836
+ Clubhouse
837
+ Twitch
838
+ Medium
839
+ BeReal
840
+ Mastodon
841
+ Tumblr
842
+ Threads
843
+ WeChat
844
+ Vk
845
+ Line
846
+ }
847
+
848
+ model User {
849
+ id String @id @default(cuid())
850
+ email String @unique
851
+ createdOn DateTime @default(now())
852
+ stripeCustomerId String? @unique
853
+ stripeAccountId String? @unique
854
+ isSuperUser Boolean @default(false)
855
+ googleCalendarAccess String?
856
+ givenName String?
857
+ familyName String?
858
+ hash String?
859
+ emailVerified DateTime?
860
+ image String?
861
+ uploadedImage String?
862
+ dob DateTime?
863
+ gender Gender?
864
+ sex Sex?
865
+ roles UserRole[] @default([User])
866
+ ownedServices Service[] @relation("OwnedService")
867
+ createdServices Service[] @relation("CreatedService")
868
+ createdEvents BashEvent[] @relation("CreatedEvent")
869
+ ticketsISent Ticket[] @relation("TicketsISent")
870
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
871
+ reviews Review[]
872
+ sponsorships SponsoredEvent[]
873
+ investments Investment[]
874
+ sessions Session[]
875
+ eventTasks EventTask[]
876
+ clubMembers ClubMember[]
877
+ clubAdmins ClubAdmin[]
878
+ links UserLink[]
879
+ status UserStatus
880
+ competitions Competition[]
881
+ competitionSponsorships CompetitionSponsor[]
882
+ competitionPrizes Prize[]
883
+ userRatingGiven UserRatingGiven[]
884
+ userRating UserRating[]
885
+ magicLink String?
886
+ magicLinkExpiration DateTime?
887
+ magicLinkUsed DateTime?
888
+ idVerified DateTime?
889
+ street String?
890
+ city String?
891
+ state String?
892
+ zipCode String?
893
+ country String? @default("US")
894
+ phone String?
895
+ socialMediaProfiles SocialMediaProfile[]
896
+ documentIDId String? @unique
897
+ documentID DocumentID?
898
+ comment BashComment[]
899
+ associatedBashes AssociatedBash[]
900
+ associatedServices AssociatedService[]
901
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
902
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
903
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
904
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
905
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
906
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
907
+ checkouts Checkout[]
908
+ ticketTiersWaitListsIveJoined TicketTier[]
909
+ contacts Contact[]
910
+ bashEventPromoCodesIUsed BashEventPromoCode[]
911
+ serviceCheckouts ServiceCheckout[]
912
+ bookingForMe Booking[]
913
+ userSubscription UserSubscription?
914
+ serviceSubcriptions ServiceSubscription[]
915
+ volunteerService VolunteerService[]
916
+ stripeAccounts StripeAccount[]
917
+ ServicePromoCodeRedemption ServicePromoCodeRedemption[]
918
+ }
919
+
920
+ model Contact {
921
+ id String @id @default(cuid())
922
+ contactOwnerId String
923
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
924
+ contactEmail String?
925
+ fullName String?
926
+ phone String?
927
+ requestToConnectSent DateTime?
928
+ requestToConnectAccepted DateTime?
929
+
930
+ @@unique([contactOwnerId, contactEmail])
931
+ @@index([contactEmail])
932
+ }
933
+
934
+ // anyone that is invited to the bash, is an organizer of a bash, and or the creator/owner of the bash...for having others (including services) edit or post about a bash in the bashfeed
935
+ model AssociatedBash {
936
+ id String @id @default(cuid())
937
+ bashEventId String
938
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
939
+ invitationId String? @unique
940
+ invitation Invitation? @relation(fields: [invitationId], references: [id])
941
+ ownerEmail String?
942
+ ownerUserId String?
943
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
944
+ isOrganizer Boolean?
945
+ isFavorite Boolean?
946
+ service Service[]
947
+
948
+ @@unique([ownerEmail, bashEventId])
949
+ }
950
+
951
+ // anyone that is invited to be an organizer of a service profile or is the creator/owner...for having others edit or post about a service in the bashfeed (but the service must be associated with a bash to post)
952
+ model AssociatedService {
953
+ id String @id @default(cuid())
954
+ serviceId String
955
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
956
+ // referralId String? @unique
957
+ // referral Referral? @relation(fields: [referralId], references: [id])
958
+ ownerEmail String?
959
+ ownerUserId String?
960
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
961
+ isOrganizer Boolean?
962
+ isFavorite Boolean?
963
+
964
+ @@unique([ownerEmail, serviceId])
965
+ }
966
+
967
+ enum ServiceCancelationPolicy {
968
+ None
969
+ VeryFlexible
970
+ Flexible
971
+ Standard90Day
972
+ Standard30Day
973
+ }
974
+
975
+ model ServiceSubscription {
976
+ id String @id @default(cuid())
977
+ ownerId String
978
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
979
+ slots Int @default(0)
980
+ stripeSubscriptionId String?
981
+ }
982
+
983
+ model ServiceListingSubscription {
984
+ id String @id @default(cuid())
985
+ stripeAccountId String
986
+ stripeAccount StripeAccount @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict, onUpdate: Restrict)
987
+ stripeCheckoutSessionId String? @unique
988
+ stripeSubscriptionId String? @unique
989
+
990
+ // lastCheckoutSessionCreatedAt DateTime
991
+ // checkoutInProgress Boolean @default(false)
992
+
993
+ subscriptionStatus ServiceSubscriptionStatus @default(None)
994
+
995
+ serviceId String @unique
996
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Restrict)
997
+
998
+ @@index([stripeCheckoutSessionId, stripeSubscriptionId])
999
+ }
1000
+
1001
+ // Common data for all services; 1-1 relation between each individual service model such as Venue
1002
+ model Service {
1003
+ id String @id @default(cuid())
1004
+
1005
+ serviceType ServiceTypes?
1006
+ serviceStatus ServiceStatus @default(Draft)
1007
+ serviceCondition ServiceCondition @default(Pending)
1008
+
1009
+ isApproved Boolean @default(false)
1010
+
1011
+ // current owner
1012
+ ownerId String?
1013
+ owner User? @relation("OwnedService", fields: [ownerId], references: [id])
1014
+
1015
+ // original creator
1016
+ creatorId String?
1017
+ creator User? @relation("CreatedService", fields: [creatorId], references: [id])
1018
+
1019
+ createdAt DateTime @default(now())
1020
+ updatedAt DateTime? @updatedAt
1021
+
1022
+ associatedBashesReferencingMe AssociatedBash[]
1023
+ associatedServicesReferencingMe AssociatedService[]
1024
+
1025
+ serviceName String?
1026
+ tagline String?
1027
+
1028
+ // this is not the business info but that which is associated with the service
1029
+ place String?
1030
+ googlePlaceId String?
1031
+ street String?
1032
+ city String?
1033
+ state String?
1034
+ zipCode String?
1035
+ country String?
1036
+ description String?
1037
+ // email String?
1038
+ // phone String?
1039
+
1040
+ pocName String?
1041
+ pocPhoneNumber String?
1042
+ pocBusinessEmail String?
1043
+
1044
+ additionalInfo String?
1045
+ coverPhoto String?
1046
+
1047
+ mission String?
1048
+ communityInvolvement String?
1049
+ emergencyContact String?
1050
+ contactDetails String?
1051
+ // rates Rate[] @relation("MultipleRates")
1052
+ cancellationPolicy ServiceCancelationPolicy? @default(None)
1053
+ // refundPolicy String?
1054
+ // insurancePolicy String?
1055
+ // hoursOfOperation Json? @default("{}")
1056
+
1057
+ displayGoogleReviewsOnDetailPage Boolean @default(true)
1058
+ displayBashReviewsOnDetailPage Boolean @default(true)
1059
+
1060
+ stripeAccountId String?
1061
+ stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict)
1062
+
1063
+ serviceListingSubscription ServiceListingSubscription?
1064
+
1065
+ targetAudienceId String? @unique
1066
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
1067
+
1068
+ visibility VisibilityPreference @default(Public)
1069
+
1070
+ bashesNotInterestedIn BashEventType[]
1071
+ bookings Booking[]
1072
+ media Media[]
1073
+ serviceLinks ServiceLink[]
1074
+
1075
+ volunteerServiceId String?
1076
+ volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
1077
+ eventService EventService?
1078
+ entertainmentService EntertainmentService?
1079
+ vendor Vendor?
1080
+ exhibitor Exhibitor?
1081
+ sponsor Sponsor?
1082
+ venue Venue?
1083
+ organization Organization?
1084
+
1085
+ serviceRatesAssociation ServiceRatesAssociation?
1086
+
1087
+ // googleReviews GoogleReview[]
1088
+
1089
+ bashEvent BashEvent[] // because a service needs to be associated with a bash to post to the bashfeed
1090
+ servicePromoCodeRedemption ServicePromoCodeRedemption[]
1091
+ }
1092
+
1093
+ model StripeAccount {
1094
+ id String @id @default(cuid())
1095
+
1096
+ ownerId String
1097
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict)
1098
+
1099
+ stripeAccountId String @unique
1100
+ stripeCustomerId String? @unique
1101
+
1102
+ logoId String?
1103
+ logo Media? @relation(fields: [logoId], references: [id], onDelete: SetNull)
1104
+
1105
+ createdAt DateTime @default(now())
1106
+ updatedAt DateTime @updatedAt
1107
+
1108
+ service Service[]
1109
+ ServiceListingSubscription ServiceListingSubscription[]
1110
+
1111
+ @@index([ownerId])
1112
+ }
1113
+
1114
+ model VolunteerService {
1115
+ id String @id @default(cuid())
1116
+ // service Service
1117
+ userId String?
1118
+ user User? @relation(fields: [userId], references: [id])
1119
+ serviceRangeId String?
1120
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1121
+ links Link[] @relation("VolunteerServiceLinks")
1122
+ // availableDateTimes ServiceAvailability[] @relation("AvailableDateTimes")
1123
+ fullName String?
1124
+ address String?
1125
+ email String?
1126
+ phone String?
1127
+ agreedToAgreement Boolean? @default(false)
1128
+ description String?
1129
+ status VolunteerServiceStatus?
1130
+ media Media[]
1131
+
1132
+ serviceRatesAssociation ServiceRatesAssociation?
1133
+
1134
+ service Service[]
1135
+ }
1136
+
1137
+ model EventService {
1138
+ id String @id @default(cuid())
1139
+ serviceId String @unique
1140
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1141
+ serviceRangeId String?
1142
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1143
+ eventServiceTypes EventServiceType[]
1144
+ eventServiceSubType String?
1145
+ yearsOfExperience YearsOfExperience
1146
+ crowdSizeId String? @unique
1147
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1148
+ goodsOrServices String[]
1149
+ menuItems String?
1150
+ venueTypes String[]
1151
+ secondaryVenueTypes String[] @default([])
1152
+ }
1153
+
1154
+ model EntertainmentService {
1155
+ id String @id @default(cuid())
1156
+ serviceId String @unique
1157
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1158
+ serviceRangeId String?
1159
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1160
+ entertainmentServiceTypes EntertainmentServiceType[]
1161
+ entertainmentServiceSubType String?
1162
+ genre MusicGenreType?
1163
+ yearsOfExperience YearsOfExperience
1164
+ crowdSizeId String? @unique
1165
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1166
+ goodsOrServices String[]
1167
+ venueTypes String[]
1168
+ secondaryVenueTypes String[] @default([])
1169
+ }
1170
+
1171
+ model Vendor {
1172
+ id String @id @default(cuid())
1173
+ serviceId String @unique
1174
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1175
+ serviceRangeId String?
1176
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1177
+ yearsOfExperience YearsOfExperience
1178
+ crowdSizeId String? @unique
1179
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1180
+ goodsOrServices String[]
1181
+ menuItems String?
1182
+ venueTypes String[]
1183
+ secondaryVenueTypes String[] @default([])
1184
+ }
1185
+
1186
+ model Exhibitor {
1187
+ id String @id @default(cuid())
1188
+ serviceId String @unique
1189
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1190
+ serviceRangeId String?
1191
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1192
+ yearsOfExperience YearsOfExperience
1193
+ crowdSizeId String? @unique
1194
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1195
+ goodsOrServices String[]
1196
+ venueTypes String[]
1197
+ secondaryVenueTypes String[] @default([])
1198
+ }
1199
+
1200
+ model Sponsor {
1201
+ id String @id @default(cuid())
1202
+ serviceId String @unique
1203
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1204
+ serviceRangeId String?
1205
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1206
+ yearsOfExperience YearsOfExperience
1207
+ crowdSizeId String? @unique
1208
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1209
+ goodsOrServices String[]
1210
+ menuItems String?
1211
+ }
1212
+
1213
+ model Venue {
1214
+ id String @id @default(cuid())
1215
+ serviceId String @unique
1216
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1217
+ // serviceConnectionId String? //Check: ?
1218
+ // serviceConnection String?
1219
+ yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1220
+ amenities String[]
1221
+ menuItems String?
1222
+ features String[]
1223
+ venueTypes String[]
1224
+ secondaryVenueTypes String[] @default([])
1225
+ pitch String?
1226
+ capacity Int?
1227
+ anticipatedAttendees Int?
1228
+ trademark Boolean?
1229
+ manager Boolean?
1230
+ allowed String?
1231
+ notAllowed String?
1232
+ vibe String?
1233
+ dress String?
1234
+
1235
+ pricingPlan VenuePricingPlan?
1236
+ // subscriptionStatus SubscriptionStatus?
1237
+ // subscriptionStartDate DateTime?
1238
+
1239
+ bashEvents BashEvent[]
1240
+ }
1241
+
1242
+ model ServicePromoCodeRedemption {
1243
+ id String @id @default(cuid())
1244
+ serviceId String?
1245
+ service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1246
+
1247
+ userId String?
1248
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
1249
+
1250
+ code String
1251
+ stripeCouponId String
1252
+ redemptionCount Int
1253
+
1254
+ lastRedeemedOn DateTime
1255
+ }
1256
+
1257
+ // model VenuePricing {
1258
+ // id String @id @default(cuid())
1259
+ // venuePricingPlan VenuePricingPlan
1260
+ // percentageRate Float? @default(0.15)
1261
+ // }
1262
+
1263
+ enum VenuePricingPlan {
1264
+ Percentage
1265
+ Subscription
1266
+ }
1267
+
1268
+ enum ServiceSubscriptionStatus {
1269
+ None
1270
+ Active
1271
+ Trialing
1272
+ Paused
1273
+ Canceled
1274
+ Incomplete
1275
+ IncompleteExpired
1276
+ Unpaid
1277
+ PastDue
1278
+ Suspended
1279
+ Expired
1280
+ }
1281
+
1282
+ model Organization {
1283
+ id String @id @default(cuid())
1284
+ serviceId String @unique
1285
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1286
+ organizationType OrganizationType[]
1287
+ goodsOrServices String[]
1288
+ venueTypes String[]
1289
+ secondaryVenueTypes String[] @default([])
1290
+ }
1291
+
1292
+ enum EventServiceType {
1293
+ Investor
1294
+ LongTermLoan
1295
+ ShortTermLoan
1296
+ EventPlanning
1297
+ Caterer
1298
+ Cleaner
1299
+ Decorator
1300
+ InteriorDesigner
1301
+ RentalEquipmentProvider
1302
+ FoodAndBeverageProvider
1303
+ MediaCapture
1304
+ AVTechnician
1305
+ GraphicDesigner
1306
+ Influencer
1307
+ Promoter
1308
+ CelebrityAppearance
1309
+ CrewHand
1310
+ EventManager
1311
+ VirtualAssistant
1312
+ Consulting
1313
+ Transportation
1314
+ }
1315
+
1316
+ enum EntertainmentServiceType {
1317
+ Emcees
1318
+ DJs
1319
+ Bands
1320
+ SoloMusicians
1321
+ Comedy
1322
+ VarietyActs
1323
+ PerformanceArtists
1324
+ Magic
1325
+ Dancers
1326
+ Aerialists
1327
+ Impersonators
1328
+ Speakers
1329
+ Auctioneers
1330
+ }
1331
+
1332
+ enum OrganizationType {
1333
+ Church
1334
+ GreekLife
1335
+ SocialClub
1336
+ Nonprofit
1337
+ Corporation
1338
+ EducationalInstitution
1339
+ Sports
1340
+ Government
1341
+ Cultural
1342
+ Lifestyle
1343
+ Political
1344
+ Tourism
1345
+ Youth
1346
+ Senior
1347
+ Tradeshow
1348
+ Conference
1349
+ FoodAndBeverage
1350
+ TechAndStartups
1351
+ }
1352
+
1353
+ enum YearsOfExperience {
1354
+ LessThanOneYear
1355
+ OneToThreeYears
1356
+ ThreeToFiveYears
1357
+ FivePlusYears
1358
+ }
1359
+
1360
+ model ServiceRange {
1361
+ id String @id @default(cuid())
1362
+ min Int @default(0)
1363
+ max Int @default(50)
1364
+ volunteerServices VolunteerService[]
1365
+ entertainmentServices EntertainmentService[]
1366
+ EventService EventService[]
1367
+ Vendor Vendor[]
1368
+ Exhibitor Exhibitor[]
1369
+ Sponsor Sponsor[]
1370
+ }
1371
+
1372
+ // model Availability {
1373
+ // id String @id @default(cuid())
1374
+ // dayOfWeek Int
1375
+ // startDateTime DateTime @db.Time
1376
+ // endDateTime DateTime @db.Time
1377
+ // // Rate Rate? @relation(fields: [rateId], references: [id])
1378
+ // rateId String?
1379
+ // }
1380
+
1381
+ // model Rate {
1382
+ // id String @id @default(cuid())
1383
+ // serviceMultipleRatesId String?
1384
+ // serviceMultipleRates Service? @relation("MultipleRates", fields: [serviceMultipleRatesId], references: [id], onDelete: Cascade)
1385
+ // bashEventId String?
1386
+ // bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
1387
+ // waitList User[]
1388
+ // price Int @default(0)
1389
+ // title String @default("Free")
1390
+ // sortOrder Int?
1391
+ // description String?
1392
+ // maximumNumberOfHours Int @default(24)
1393
+ // maximumHourCount Int @default(24)
1394
+ // isDonationTier Boolean?
1395
+ // hidden Boolean?
1396
+ // Availability Availability[]
1397
+
1398
+ // // promoCodes BashEventPromoCode[]
1399
+ // @@unique([bashEventId, title])
1400
+ // }
1401
+
1402
+ // model ServiceRate {
1403
+ // id String @id @default(cuid())
1404
+ // rateType ServiceRateType
1405
+ // rate Int?
1406
+ // ServiceSpecialRates ServiceSpecialRates[]
1407
+ // }
1408
+
1409
+ // model ServiceGeneralRates {
1410
+ // id String @id @default(cuid())
1411
+
1412
+ // serviceRateId String?
1413
+ // serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
1414
+
1415
+ // // generalHourlyRate Int
1416
+ // // generalDailyRate Int
1417
+ // // generalWeeklyRate Int
1418
+ // // generalMonthlyRate Int
1419
+ // }
1420
+
1421
+ enum ServiceRateType {
1422
+ General
1423
+ Weekday
1424
+ Special
1425
+ // CLOSED
1426
+ // HOURLY
1427
+ // DAILY
1428
+ // WEEKLY
1429
+ }
1430
+
1431
+ //can optionally be associated with a package
1432
+ model ServiceAddon {
1433
+ id String @id @default(cuid())
1434
+ name String
1435
+ description String
1436
+ price Int?
1437
+ quantity Int
1438
+
1439
+ servicePackage ServicePackage? @relation(fields: [servicePackageId], references: [id], onDelete: Cascade)
1440
+ servicePackageId String?
1441
+
1442
+ serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1443
+ serviceRatesAssociationId String?
1444
+ }
1445
+
1446
+ model ServicePackage {
1447
+ id String @id @default(cuid())
1448
+ name String
1449
+ description String
1450
+ price Int
1451
+
1452
+ serviceAddons ServiceAddon[]
1453
+
1454
+ serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1455
+ serviceRatesAssociationId String?
1456
+ }
1457
+
1458
+ model ServiceRate {
1459
+ id String @id @default(cuid())
1460
+ rateType ServiceRateType
1461
+ hourlyRate Int?
1462
+ dailyRate Int?
1463
+ cleaningFeePerBooking Int?
1464
+ minimumTimeBlockHours Int?
1465
+ serviceSpecialRates ServiceSpecialRates?
1466
+ serviceDailyRates ServiceDailyRates?
1467
+ serviceRatesAssociation ServiceRatesAssociation?
1468
+
1469
+ @@index([rateType])
1470
+ }
1471
+
1472
+ // if isAvailable is false it is closed
1473
+ model ServiceSpecialRates {
1474
+ id String @id @default(cuid())
1475
+ startDate DateTime @db.Date
1476
+ endDate DateTime @db.Date
1477
+
1478
+ serviceRateId String?
1479
+ serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
1480
+ isAvailable Boolean
1481
+
1482
+ serviceRatesAssociationId String
1483
+ serviceRatesAssociation ServiceRatesAssociation @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1484
+
1485
+ @@unique([serviceRateId])
1486
+ }
1487
+
1488
+ // different days of the week have different rates
1489
+ // can block of certain dates of the year and days of the week as being closed
1490
+ // can have special rates on different days of the year (single or range)
1491
+ // free trial period with promo code (1 or 2 months of listing for free)
1492
+ model ServiceDailyRates {
1493
+ id String @id @default(cuid())
1494
+ dayOfWeek DayOfWeek
1495
+ startTime DateTime @db.Time
1496
+ endTime DateTime @db.Time
1497
+
1498
+ serviceRateId String?
1499
+ serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
1500
+
1501
+ serviceRatesAssociationId String
1502
+ serviceRatesAssociation ServiceRatesAssociation @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
1503
+
1504
+ @@unique([serviceRateId])
1505
+ }
1506
+
1507
+ model ServiceRatesAssociation {
1508
+ id String @id @default(cuid())
1509
+
1510
+ serviceId String?
1511
+ service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1512
+ volunteerServiceId String?
1513
+ volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id], onDelete: Cascade)
1514
+
1515
+ serviceGeneralRatesId String?
1516
+ serviceGeneralRates ServiceRate? @relation(fields: [serviceGeneralRatesId], references: [id], onDelete: Cascade)
1517
+
1518
+ serviceDailyRates ServiceDailyRates[]
1519
+ serviceSpecialRates ServiceSpecialRates[]
1520
+
1521
+ addons ServiceAddon[]
1522
+ packages ServicePackage[]
1523
+
1524
+ media Media[]
1525
+
1526
+ @@unique([serviceId])
1527
+ @@unique([volunteerServiceId])
1528
+ @@unique([serviceGeneralRatesId])
1529
+ }
1530
+
1531
+ enum VisibilityPreference {
1532
+ Public
1533
+ Private
1534
+ }
1535
+
1536
+ enum MusicGenreType {
1537
+ Classical
1538
+ Rock
1539
+ HipHop
1540
+ Country
1541
+ Pop
1542
+ EDM
1543
+ Indie
1544
+ Acoustic
1545
+ }
1546
+
1547
+ enum UserRole {
1548
+ User
1549
+ Vendor
1550
+ Sponsor
1551
+ Investor
1552
+ LoanProvider
1553
+ VenueProvider
1554
+ ServiceProvider
1555
+ SuperAdmin
1556
+ Exhibitor
1557
+ }
1558
+
1559
+ model UserLink {
1560
+ id String @id @default(cuid())
1561
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1562
+ linkId String
1563
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1564
+ userId String
1565
+ }
1566
+
1567
+ model UserRating {
1568
+ id String @id @default(cuid())
1569
+ rating Int
1570
+ comment String?
1571
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1572
+ userRatingGivenId String
1573
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1574
+ userId String
1575
+ }
1576
+
1577
+ model UserRatingGiven {
1578
+ id String @id @default(cuid())
1579
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1580
+ userId String
1581
+ UserRating UserRating[]
1582
+ }
1583
+
1584
+ enum UserStatus {
1585
+ Active
1586
+ Inactive
1587
+ Suspended
1588
+ Deactivated
1589
+ }
1590
+
1591
+ model VerificationToken {
1592
+ identifier String
1593
+ token String @unique
1594
+ expires DateTime
1595
+
1596
+ @@unique([identifier, token])
1597
+ }
1598
+
1599
+ model ServiceLink {
1600
+ id String @id @default(cuid())
1601
+ serviceId String
1602
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1603
+ linkId String
1604
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1605
+
1606
+ @@index([serviceId])
1607
+ }
1608
+
1609
+ enum ServiceTypes {
1610
+ EventServices
1611
+ EntertainmentServices
1612
+ Vendors
1613
+ Exhibitors
1614
+ Sponsors
1615
+ Venues
1616
+ Organizations
1617
+ }
1618
+
1619
+ enum EntityType {
1620
+ EVENT_SERVICE
1621
+ ENTERTAINMENT_SERVICE
1622
+ VENDOR
1623
+ EXHIBITOR
1624
+ SPONSOR
1625
+ VENUE
1626
+ ORGANIZATION
1627
+ BASH_EVENT // For BashEvents
1628
+ }