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