@bash-app/bash-common 13.8.0 → 13.10.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,978 +1,978 @@
1
- // This is your Prisma schema file,
2
- // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
-
4
- generator client {
5
- provider = "prisma-client-js"
6
- }
7
-
8
- datasource db {
9
- provider = "postgresql"
10
- url = env("POSTGRES_PRISMA_URL") // uses connection pooling
11
- directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
12
- }
13
-
14
- model Business {
15
- id String @id @default(cuid())
16
- name String
17
- ein String?
18
- dba String?
19
- address String?
20
- media Media[]
21
- }
22
-
23
- model Club {
24
- id String @id @default(cuid())
25
- name String
26
- address String
27
- userId String
28
- price Int?
29
- events BashEvent[]
30
- members ClubMember[]
31
- admin ClubAdmin[]
32
- }
33
-
34
- model ClubAdmin {
35
- id String @id @default(cuid())
36
- admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
37
- userId String
38
- club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
39
- clubId String
40
- role ClubAdminRole
41
- }
42
-
43
- model ClubMember {
44
- id String @id @default(cuid())
45
- member User @relation(fields: [userId], references: [id], onDelete: Cascade)
46
- userId String
47
- club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
48
- clubId String
49
- status ClubMemberStatus
50
- statusHistory Json
51
- price Int?
52
- }
53
-
54
- enum ClubAdminRole {
55
- Owner
56
- Admin
57
- Staff
58
- }
59
-
60
- enum ClubMemberStatus {
61
- Active
62
- Inactive
63
- Cancelled
64
- Paused
65
- Removed
66
- }
67
-
68
- model BashComment {
69
- id String @id @default(cuid())
70
- creatorId String
71
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
72
- content String
73
- reviewId String?
74
- review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
75
- bashEventId String?
76
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
77
- parentCommentId String?
78
- parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
79
- replies BashComment[] @relation("CommentReplies")
80
- }
81
-
82
- model Competition {
83
- id String @id @default(cuid())
84
- name String
85
- description String
86
- owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
87
- prizes Prize[]
88
- userId String
89
- sponser CompetitionSponsor[]
90
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
91
- bashEventId String
92
- numberOfPrizes Int
93
- }
94
-
95
- model CompetitionSponsor {
96
- id String @id @default(cuid())
97
- competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
98
- sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
99
- competitionId String
100
- userId String
101
- description String
102
- paidOn String?
103
- }
104
-
105
- model EventTask {
106
- id String @id @default(cuid())
107
- creatorId String
108
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
109
- bashEventId String
110
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
111
- description String
112
- assignedToId String?
113
- assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
114
- status TaskStatus?
115
- bashNotificationsReferencingMe BashNotification[]
116
- createdAt DateTime? @default(now())
117
- }
118
-
119
- enum TaskStatus {
120
- Accepted
121
- Rejected
122
- Completed
123
- }
124
-
125
- model Reminder {
126
- id String @id @default(cuid())
127
- creatorId String
128
- creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
129
- remindWhoId String?
130
- remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
131
- remindDateTime DateTime
132
- notificationId String
133
- notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
134
- }
135
-
136
- model BashEventPromoCode {
137
- id String @id @default(cuid())
138
- code String
139
- ticketTierId String
140
- ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
141
- stripeCouponId String?
142
- discountAmountInCents Int?
143
- discountAmountPercentage Int?
144
- maxRedemptions Int?
145
- redeemBy DateTime?
146
- usedBy User[]
147
-
148
- @@unique([ticketTierId, code])
149
- }
150
-
151
- model BashNotification {
152
- id String @id @default(cuid())
153
- creatorId String
154
- creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
155
- email String
156
- createdDateTime DateTime @default(now())
157
- message String
158
- image String?
159
- readDateTime DateTime?
160
- taskId String?
161
- eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
162
- invitationId String?
163
- invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
164
- bashEventId String?
165
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
166
- reminders Reminder[]
167
- redirectUrl String?
168
-
169
- @@unique([creatorId, email, bashEventId])
170
- @@unique([creatorId, email, invitationId])
171
- @@index([creatorId])
172
- }
173
-
174
- model Invitation {
175
- id String @id @default(cuid())
176
- creatorId String
177
- creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
178
- email String
179
- sentToId String?
180
- sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
181
- bashEventId String?
182
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
183
- image String?
184
- phone String?
185
- name String?
186
- message String?
187
- inviteDate DateTime? @default(now())
188
- acceptedDate DateTime?
189
- rejectedDate DateTime?
190
- maybeDate DateTime?
191
- tickets Ticket[] @relation("TicketsForInvitation")
192
- bashNotifications BashNotification[]
193
- associatedBash AssociatedBash?
194
-
195
- @@index([email])
196
- }
197
-
198
- model BashEvent {
199
- id String @id @default(cuid())
200
- title String
201
- creatorId String
202
- creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
203
- description String?
204
- eventType String @default("Other")
205
- startDateTime DateTime? @default(now())
206
- endDateTime DateTime? @default(now())
207
- ticketTiers TicketTier[]
208
- targetAudience TargetAudience?
209
- amountOfGuests AmountOfGuests?
210
- recurrence Recurrence?
211
- vibe String?
212
- occasion String?
213
- dress String?
214
- allowed String?
215
- notAllowed String?
216
- nonProfit Boolean?
217
- nonProfitId String?
218
- privacy Privacy @default(Public)
219
- tickets Ticket[]
220
- reviews Review[]
221
- sponsorships SponsoredEvent[]
222
- investments Investment[]
223
- capacity Int?
224
- location String?
225
- status BashStatus @default(Draft)
226
- tags String[]
227
- coverPhoto String?
228
- media Media[]
229
- club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
230
- clubId String?
231
- links EventLink[]
232
- competitions Competition[]
233
- invitations Invitation[]
234
- dateTimePublished DateTime?
235
- comments BashComment[]
236
- includedItems String[]
237
- associatedBashesReferencingMe AssociatedBash[]
238
- bashNotificationsReferencingMe BashNotification[]
239
- checkouts Checkout[]
240
- eventTasks EventTask[]
241
- videoLink String?
242
- subtitle String?
243
- }
244
-
245
- model Checkout {
246
- id String @id @default(cuid())
247
- ownerId String
248
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
249
- bashEventId String
250
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
251
- checkoutDateTime DateTime? @default(now())
252
- tickets Ticket[]
253
- stripeCheckoutSessionId String? @unique
254
-
255
- @@index(bashEventId)
256
- }
257
-
258
- model TicketTier {
259
- id String @id @default(cuid())
260
- bashEventId String
261
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
262
- tickets Ticket[]
263
- waitList User[]
264
- price Int @default(0)
265
- title String @default("Free")
266
- sortOrder Int?
267
- description String?
268
- maximumNumberOfTickets Int @default(100)
269
- isDonationTier Boolean?
270
- hidden Boolean?
271
- promoCodes BashEventPromoCode[]
272
-
273
- @@unique([bashEventId, title])
274
- }
275
-
276
- model Ticket {
277
- id String @id @default(cuid())
278
- ownerId String
279
- owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
280
- bashEventId String
281
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
282
- ticketTierId String?
283
- ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
284
- validDate DateTime?
285
- forUserId String?
286
- forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
287
- fullName String?
288
- email String?
289
- paidOn DateTime?
290
- allowPromiseToPay Boolean?
291
- status TicketStatus?
292
- isFreeGuest Boolean?
293
- geoFenceCheckInUnnecessary Boolean?
294
- checkedInAt DateTime?
295
- checkedOutAt DateTime?
296
- invitationId String?
297
- invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
298
- checkoutId String?
299
- checkout Checkout? @relation(fields: [checkoutId], references: [id])
300
-
301
- @@index([bashEventId])
302
- }
303
-
304
- enum TicketStatus {
305
- Cancelled
306
- Attended
307
- Missed
308
- }
309
-
310
- model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
311
- id String @id @default(cuid())
312
- doNotUseVibeEnum BashEventVibeTags @default(Wild)
313
- doNotUseDressEnum BashEventDressTags @default(Casual)
314
- doNotUseBashEventType BashEventType @default(Other)
315
- doNotUseDayOfWeek DayOfWeek @default(Sunday)
316
- }
317
-
318
- model Recurrence {
319
- id String @id @default(cuid())
320
- interval Int @default(1)
321
- bashEventId String @unique
322
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
323
- frequency RecurringFrequency @default(Never)
324
- ends DateTime @default(now())
325
- repeatOnDays DayOfWeek[]
326
- repeatOnDayOfMonth Int?
327
- repeatYearlyDate DateTime?
328
- }
329
-
330
- enum DayOfWeek {
331
- Sunday
332
- Monday
333
- Tuesday
334
- Wednesday
335
- Thursday
336
- Friday
337
- Saturday
338
- }
339
-
340
- enum RecurringFrequency {
341
- Never
342
- Daily
343
- Weekly
344
- Monthly
345
- Yearly
346
- }
347
-
348
- enum BashEventVibeTags {
349
- Wild
350
- Calm
351
- }
352
-
353
- enum BashEventDressTags {
354
- Casual
355
- BusinessCasual
356
- Formal
357
- }
358
-
359
- // enum ServicesTags {
360
- // Fast
361
- // Reliable
362
- // AwardRecipient
363
- // }
364
-
365
- enum BashEventType {
366
- AfterParty
367
- AnimeAndCosplayFestival
368
- AnniversaryCelebration
369
- ArtExhibitOpening
370
- ArtAndCraftNight
371
- BBQCookout
372
- BabyShower
373
- BachelorOrBacheloretteParty
374
- BeachParty
375
- Birthday
376
- BoatPartyOrCruise
377
- Bonfire
378
- BookClubMeeting
379
- BridalShower
380
- BrunchGathering
381
- CarShow
382
- CarnivalAndFair
383
- CasinoNight
384
- CasualMixer
385
- CharityBall
386
- CharityFundraiser
387
- ChristmasParty
388
- ChurchEvent
389
- CircusOrCarnivalParty
390
- CocktailParty
391
- CollegeParty_FraternityOrSorority
392
- ComedyShowOrStandUpComedyNight
393
- ComicConvention
394
- Competition
395
- Concert
396
- CookingCompetition
397
- CorporateEventOrOfficeParty
398
- CostumeParty_Theme_Based
399
- CulturalFestival
400
- DanceParty
401
- DesertRave
402
- DiscoNight
403
- EasterGathering
404
- EngagementParty
405
- ESportsGamingTournament
406
- ExclusiveLuxuryRetreat
407
- FantasyThemedParty
408
- FashionShow
409
- Fireside
410
- FitnessFestival
411
- FlashMob
412
- Festival
413
- FestivalFilm
414
- FestivalFood
415
- FundraisingEvent
416
- GalaDinner
417
- GameNight
418
- GamingEvent
419
- GardenParty
420
- GoingAwayPartyOrFarewell
421
- GraduationParty
422
- HalloweenCostumeParty
423
- HanukkahParty
424
- HistoricalEraParty
425
- HolidayParty
426
- HouseParty
427
- HousewarmingParty
428
- KaraokeNight
429
- KiteFlyingFestival
430
- LiveBandPerformanceInALocalVenue
431
- Luau
432
- MansionParty
433
- MardiGras
434
- MasqueradeBall
435
- MotorcycleRally
436
- MovieNight
437
- MoviePremiere
438
- MusicFestival
439
- NewYearsEveCelebration
440
- OpenMicNight
441
- OutdoorActivity
442
- OutdoorConcert
443
- OutdoorMovieNight_WithAProjector
444
- Parade
445
- Party
446
- PoolParty
447
- Potluck
448
- PotluckVegan
449
- PreParty
450
- ProductLaunch
451
- ProfessionalNetworkingEvent
452
- Rave_General
453
- RetirementCelebration
454
- Reunion_FamilyOrSchoolOrFriends
455
- SafariAdventureParty
456
- SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
457
- ScienceFictionThemedParty
458
- SocialClubEvent
459
- SportsTournament
460
- SportsWatchParty
461
- SuperheroThemedParty
462
- SurfCompetition
463
- ThanksgivingDinner
464
- ThemedCostumeParty
465
- ThemedDinnerParty
466
- ThemedPubCrawl
467
- Tournament
468
- TravelAndTradeShow
469
- TriviaNight
470
- ValentinesDayParty
471
- WeddingReception
472
- WelcomeHomeParty
473
- WellnessFestival
474
- WineTastingEvent
475
- Other
476
- }
477
-
478
- model CustomBashEventType {
479
- id String @id @default(cuid())
480
- key String @unique
481
- displayName String
482
- }
483
-
484
- model AmountOfGuests {
485
- id String @id @default(cuid())
486
- bashEventId String @unique
487
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
488
- minimum Int? @default(10)
489
- ideal Int? @default(35)
490
- showMinimumGuests Boolean @default(true)
491
- showIdealGuests Boolean @default(true)
492
- }
493
-
494
- enum Privacy {
495
- Public
496
- ConnectionsOnly
497
- InviteOnly
498
- }
499
-
500
- model TargetAudience {
501
- id String @id @default(cuid())
502
- bashEventId String @unique
503
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
504
- ageRange AgeRange @default(NoPreference)
505
- gender Gender @default(NoPreference)
506
- occupation Occupation @default(NoPreference)
507
- education Education @default(NoPreference)
508
- showOnDetailPage Boolean @default(true)
509
- }
510
-
511
- model ServiceTargetAudience {
512
- id String @id @default(cuid())
513
- serviceId String
514
- ageRange AgeRange @default(NoPreference)
515
- gender Gender @default(NoPreference)
516
- occupation Occupation @default(NoPreference)
517
- education Education @default(NoPreference)
518
- showOnDetailPage Boolean @default(true)
519
-
520
- service Service @relation(fields: [serviceId], references: [id])
521
- }
522
-
523
- enum AgeRange {
524
- Eighteen_24
525
- TwentyFive_34
526
- ThirtyFive_49
527
- FiftyPlus
528
- NoPreference
529
- }
530
-
531
- enum Occupation {
532
- Student
533
- Startups
534
- SMBs
535
- Corporations
536
- Professional
537
- AngelInvestors
538
- FamilyOffice
539
- Retired
540
- NoPreference
541
- }
542
-
543
- enum Education {
544
- HighSchool
545
- InCollege
546
- Bachelors
547
- Masters
548
- Doctorate
549
- NoPreference
550
- }
551
-
552
- enum BashStatus {
553
- Draft
554
- PreSale
555
- Published
556
- }
557
-
558
- enum ServiceStatus {
559
- Draft
560
- Created
561
- }
562
-
563
- model DocumentID {
564
- id String @id @default(cuid())
565
- givenName String?
566
- familyName String?
567
- middleName String?
568
- suffix String?
569
- streetAddress String?
570
- city String?
571
- state String?
572
- stateName String?
573
- postalCode String?
574
- idNumber String?
575
- expires String?
576
- dob String?
577
- issueDate String?
578
- idType String?
579
- userId String? @unique
580
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
581
- }
582
-
583
- model EventLink {
584
- id String @id @default(cuid())
585
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
586
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
587
- linkId String
588
- bashEventId String
589
- }
590
-
591
- enum Gender {
592
- Male
593
- Female
594
- Other
595
- NoPreference
596
- }
597
-
598
- model Investment {
599
- id String @id @default(cuid())
600
- investorId String
601
- bashEventId String
602
- investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
603
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
604
- amount Float
605
- type InvestmentType
606
- paidOn String?
607
- }
608
-
609
- enum InvestmentType {
610
- Equity
611
- Event
612
- }
613
-
614
- model Link {
615
- id String @id @default(cuid())
616
- url String
617
- type String?
618
- icon String?
619
- vendorLinks VendorLink[]
620
- eventLinks EventLink[]
621
- userLinks UserLink[]
622
- serviceLinks ServiceLink[]
623
- }
624
-
625
- model Media {
626
- id String @id @default(cuid())
627
- url String @unique
628
- type MediaType
629
- mimetype String?
630
- bashEventsReferencingMe BashEvent[]
631
- businessesReferencingMe Business[]
632
- sponsoredEventsReferencingMe SponsoredEvent[]
633
- servicesReferencingMe Service[]
634
- }
635
-
636
- enum MediaType {
637
- Unknown
638
- Empty
639
- Image
640
- Video
641
- }
642
-
643
- model Prize {
644
- id String @id @default(cuid())
645
- prizeWorth Float?
646
- prizeType PrizeType
647
- name String
648
- prizeLevel Int
649
- description String
650
- competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
651
- competitionId String?
652
- paidOn String?
653
- winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
654
- winnerUserId String?
655
- }
656
-
657
- enum PrizeType {
658
- Monetary
659
- Merchandise
660
- Service
661
- Combo
662
- }
663
-
664
- model Review {
665
- id String @id @default(cuid())
666
- rating Int
667
- creatorId String
668
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
669
- bashEventId String
670
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
671
- comments BashComment[]
672
- }
673
-
674
- model Session {
675
- id String @id @default(cuid())
676
- sessionToken String @unique
677
- userId String
678
- expires DateTime
679
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
680
-
681
- @@index([userId])
682
- }
683
-
684
- enum Sex {
685
- Male
686
- Female
687
- Other
688
- }
689
-
690
- model SponsoredEvent {
691
- id String @id @default(cuid())
692
- amount Float?
693
- paidOn String?
694
- sponsorType SponsorType
695
- sponsorId String
696
- bashEventId String
697
- sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
698
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
699
- media Media[]
700
- }
701
-
702
- enum SponsorType {
703
- Marketing
704
- Giveaway
705
- Awareness
706
- Trade
707
- CompetitionPrizeProvider
708
- }
709
-
710
- model User {
711
- id String @id @default(cuid())
712
- email String @unique
713
- createdOn DateTime @default(now())
714
- stripeCustomerId String? @unique
715
- stripeAccountId String? @unique
716
- googleCalendarAccess String?
717
- givenName String?
718
- familyName String?
719
- hash String?
720
- emailVerified DateTime?
721
- image String?
722
- uploadedImage String?
723
- dob DateTime?
724
- gender Gender?
725
- sex Sex?
726
- roles UserRole[] @default([User])
727
- services Service[]
728
- createdEvents BashEvent[] @relation("CreatedEvent")
729
- ticketsISent Ticket[] @relation("TicketsISent")
730
- ticketsIOwn Ticket[] @relation("TicketsIOwn")
731
- reviews Review[]
732
- sponsorships SponsoredEvent[]
733
- investments Investment[]
734
- sessions Session[]
735
- eventTasks EventTask[]
736
- vendors Vendor[]
737
- clubMembers ClubMember[]
738
- clubAdmins ClubAdmin[]
739
- links UserLink[]
740
- status UserStatus
741
- competitions Competition[]
742
- competitionSponsorships CompetitionSponsor[]
743
- competitionPrizes Prize[]
744
- userRatingGiven UserRatingGiven[]
745
- userRating UserRating[]
746
- magicLink String?
747
- magicLinkExpiration DateTime?
748
- magicLinkUsed DateTime?
749
- idVerified DateTime?
750
- streetAddress String?
751
- city String?
752
- state String?
753
- postalCode String?
754
- country String? @default("US")
755
- phone String?
756
- documentIDId String? @unique
757
- documentID DocumentID?
758
- comment BashComment[]
759
- associatedBashes AssociatedBash[]
760
- invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
761
- invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
762
- notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
763
- remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
764
- remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
765
- eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
766
- checkouts Checkout[]
767
- ticketTiersWaitListsIveJoined TicketTier[]
768
- contacts Contact[]
769
- bashEventPromoCodesIUsed BashEventPromoCode[]
770
- }
771
-
772
- model Contact {
773
- id String @id @default(cuid())
774
- contactOwnerId String
775
- contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
776
- contactEmail String?
777
- fullName String?
778
- phone String?
779
- requestToConnectSent DateTime?
780
- requestToConnectAccepted DateTime?
781
-
782
- @@unique([contactOwnerId, contactEmail])
783
- @@index([contactEmail])
784
- }
785
-
786
- model AssociatedBash {
787
- id String @id @default(cuid())
788
- bashEventId String
789
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
790
- invitationId String? @unique
791
- invitation Invitation? @relation(fields: [invitationId], references: [id])
792
- ownerEmail String?
793
- ownerUserId String?
794
- owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
795
- isOrganizer Boolean?
796
- isFavorite Boolean?
797
-
798
- @@unique([ownerEmail, bashEventId])
799
- }
800
-
801
- model Service {
802
- id String @id @default(cuid())
803
- ownerId String
804
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
805
- email String
806
- streetAddress String
807
- city String
808
- state String
809
- postalCode String
810
- country String
811
- phone String
812
- privacy Privacy @default(Public)
813
- title String
814
- coverPhoto String?
815
- media Media[]
816
- serviceTypes ServiceType[]
817
- subServiceTypes SubServiceType[]
818
- serviceTag ServiceTag[]
819
- customServiceTag String[]
820
- yearsOfExperince YearsOfExperience @default(LessThanOneYear)
821
- serviceLinks ServiceLink[]
822
- description String?
823
- canContact Boolean?
824
- musicGenre MusicGenreType?
825
- visibility VisibilityPreference @default(Public)
826
- bashesInterestedIn BashEventType[]
827
- crowdSizeId String @unique
828
- crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
829
- serviceRangeId String @unique
830
- serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
831
- availableDateTimes String[] /// Stored in format: ["startDateTime,endDateTime",...]
832
- serviceTargetAudience ServiceTargetAudience[]
833
- status ServiceStatus @default(Draft)
834
-
835
- @@index([email])
836
- @@index([phone])
837
- }
838
-
839
- enum ServiceTag {
840
- Italian
841
- }
842
-
843
- enum SubServiceType {
844
- Catering
845
- DJing
846
- LiveBand
847
- Photography
848
- Videography
849
- }
850
-
851
- enum YearsOfExperience {
852
- LessThanOneYear
853
- OneToThreeYears
854
- ThreeToFiveYears
855
- FivePlusYears
856
- }
857
-
858
- model ServiceRange {
859
- id String @id @default(cuid())
860
- min Int @default(0)
861
- max Int @default(50)
862
- serviceCrowdSize Service? @relation("CrowdSize")
863
- serviceServiceRange Service? @relation("ServiceRange")
864
- }
865
-
866
- model Availability {
867
- id String @id @default(cuid())
868
- startDateTime String
869
- endDateTime String
870
- }
871
-
872
- enum VisibilityPreference {
873
- Public
874
- Private
875
- }
876
-
877
- enum MusicGenreType {
878
- Classical
879
- Rock
880
- HipHop
881
- Country
882
- Pop
883
- EDM
884
- Indie
885
- Acoustic
886
- }
887
-
888
- enum ServiceType {
889
- EventService
890
- EntertainmentService
891
- Volunteer
892
- PartnerService
893
- Venue
894
- Vendor
895
- Exhibitor
896
- Sponsor
897
- Organization
898
- }
899
-
900
- enum UserRole {
901
- User
902
- Vendor
903
- Sponsor
904
- Investor
905
- LoanProvider
906
- VenueProvider
907
- ServiceProvider
908
- SuperAdmin
909
- Exhibitor
910
- }
911
-
912
- model UserLink {
913
- id String @id @default(cuid())
914
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
915
- linkId String
916
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
917
- userId String
918
- }
919
-
920
- model UserRating {
921
- id String @id @default(cuid())
922
- rating Int
923
- comment String?
924
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
925
- userRatingGivenId String
926
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
927
- userId String
928
- }
929
-
930
- model UserRatingGiven {
931
- id String @id @default(cuid())
932
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
933
- userId String
934
- UserRating UserRating[]
935
- }
936
-
937
- enum UserStatus {
938
- Active
939
- Inactive
940
- Suspended
941
- Deactivated
942
- }
943
-
944
- model VerificationToken {
945
- identifier String
946
- token String @unique
947
- expires DateTime
948
-
949
- @@unique([identifier, token])
950
- }
951
-
952
- model Vendor {
953
- id String @id @default(cuid())
954
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
955
- ownerId String
956
- type String
957
- amount Float?
958
- paidOn String?
959
- links VendorLink[]
960
- }
961
-
962
- model VendorLink {
963
- id String @id @default(cuid())
964
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
965
- vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
966
- linkId String
967
- vendorId String
968
- }
969
-
970
- model ServiceLink {
971
- id String @id @default(cuid())
972
- serviceId String
973
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
974
- linkId String
975
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
976
-
977
- @@index([serviceId])
978
- }
1
+ // This is your Prisma schema file,
2
+ // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
+
4
+ generator client {
5
+ provider = "prisma-client-js"
6
+ }
7
+
8
+ datasource db {
9
+ provider = "postgresql"
10
+ url = env("POSTGRES_PRISMA_URL") // uses connection pooling
11
+ directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
12
+ }
13
+
14
+ model Business {
15
+ id String @id @default(cuid())
16
+ name String
17
+ ein String?
18
+ dba String?
19
+ address String?
20
+ media Media[]
21
+ }
22
+
23
+ model Club {
24
+ id String @id @default(cuid())
25
+ name String
26
+ address String
27
+ userId String
28
+ price Int?
29
+ events BashEvent[]
30
+ members ClubMember[]
31
+ admin ClubAdmin[]
32
+ }
33
+
34
+ model ClubAdmin {
35
+ id String @id @default(cuid())
36
+ admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
37
+ userId String
38
+ club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
39
+ clubId String
40
+ role ClubAdminRole
41
+ }
42
+
43
+ model ClubMember {
44
+ id String @id @default(cuid())
45
+ member User @relation(fields: [userId], references: [id], onDelete: Cascade)
46
+ userId String
47
+ club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
48
+ clubId String
49
+ status ClubMemberStatus
50
+ statusHistory Json
51
+ price Int?
52
+ }
53
+
54
+ enum ClubAdminRole {
55
+ Owner
56
+ Admin
57
+ Staff
58
+ }
59
+
60
+ enum ClubMemberStatus {
61
+ Active
62
+ Inactive
63
+ Cancelled
64
+ Paused
65
+ Removed
66
+ }
67
+
68
+ model BashComment {
69
+ id String @id @default(cuid())
70
+ creatorId String
71
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
72
+ content String
73
+ reviewId String?
74
+ review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
75
+ bashEventId String?
76
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
77
+ parentCommentId String?
78
+ parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
79
+ replies BashComment[] @relation("CommentReplies")
80
+ }
81
+
82
+ model Competition {
83
+ id String @id @default(cuid())
84
+ name String
85
+ description String
86
+ owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
87
+ prizes Prize[]
88
+ userId String
89
+ sponser CompetitionSponsor[]
90
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
91
+ bashEventId String
92
+ numberOfPrizes Int
93
+ }
94
+
95
+ model CompetitionSponsor {
96
+ id String @id @default(cuid())
97
+ competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
98
+ sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
99
+ competitionId String
100
+ userId String
101
+ description String
102
+ paidOn String?
103
+ }
104
+
105
+ model EventTask {
106
+ id String @id @default(cuid())
107
+ creatorId String
108
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
109
+ bashEventId String
110
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
111
+ description String
112
+ assignedToId String?
113
+ assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
114
+ status TaskStatus?
115
+ bashNotificationsReferencingMe BashNotification[]
116
+ createdAt DateTime? @default(now())
117
+ }
118
+
119
+ enum TaskStatus {
120
+ Accepted
121
+ Rejected
122
+ Completed
123
+ }
124
+
125
+ model Reminder {
126
+ id String @id @default(cuid())
127
+ creatorId String
128
+ creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
129
+ remindWhoId String?
130
+ remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
131
+ remindDateTime DateTime
132
+ notificationId String
133
+ notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
134
+ }
135
+
136
+ model BashEventPromoCode {
137
+ id String @id @default(cuid())
138
+ code String
139
+ ticketTierId String
140
+ ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
141
+ stripeCouponId String?
142
+ discountAmountInCents Int?
143
+ discountAmountPercentage Int?
144
+ maxRedemptions Int?
145
+ redeemBy DateTime?
146
+ usedBy User[]
147
+
148
+ @@unique([ticketTierId, code])
149
+ }
150
+
151
+ model BashNotification {
152
+ id String @id @default(cuid())
153
+ creatorId String
154
+ creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
155
+ email String
156
+ createdDateTime DateTime @default(now())
157
+ message String
158
+ image String?
159
+ readDateTime DateTime?
160
+ taskId String?
161
+ eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
162
+ invitationId String?
163
+ invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
164
+ bashEventId String?
165
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
166
+ reminders Reminder[]
167
+ redirectUrl String?
168
+
169
+ @@unique([creatorId, email, bashEventId])
170
+ @@unique([creatorId, email, invitationId])
171
+ @@index([creatorId])
172
+ }
173
+
174
+ model Invitation {
175
+ id String @id @default(cuid())
176
+ creatorId String
177
+ creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
178
+ email String
179
+ sentToId String?
180
+ sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
181
+ bashEventId String?
182
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
183
+ image String?
184
+ phone String?
185
+ name String?
186
+ message String?
187
+ inviteDate DateTime? @default(now())
188
+ acceptedDate DateTime?
189
+ rejectedDate DateTime?
190
+ maybeDate DateTime?
191
+ tickets Ticket[] @relation("TicketsForInvitation")
192
+ bashNotifications BashNotification[]
193
+ associatedBash AssociatedBash?
194
+
195
+ @@index([email])
196
+ }
197
+
198
+ model BashEvent {
199
+ id String @id @default(cuid())
200
+ title String
201
+ creatorId String
202
+ creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
203
+ description String?
204
+ eventType String @default("Other")
205
+ startDateTime DateTime? @default(now())
206
+ endDateTime DateTime? @default(now())
207
+ ticketTiers TicketTier[]
208
+ targetAudience TargetAudience?
209
+ amountOfGuests AmountOfGuests?
210
+ recurrence Recurrence?
211
+ vibe String?
212
+ occasion String?
213
+ dress String?
214
+ allowed String?
215
+ notAllowed String?
216
+ nonProfit Boolean?
217
+ nonProfitId String?
218
+ privacy Privacy @default(Public)
219
+ tickets Ticket[]
220
+ reviews Review[]
221
+ sponsorships SponsoredEvent[]
222
+ investments Investment[]
223
+ capacity Int?
224
+ location String?
225
+ status BashStatus @default(Draft)
226
+ tags String[]
227
+ coverPhoto String?
228
+ media Media[]
229
+ club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
230
+ clubId String?
231
+ links EventLink[]
232
+ competitions Competition[]
233
+ invitations Invitation[]
234
+ dateTimePublished DateTime?
235
+ comments BashComment[]
236
+ includedItems String[]
237
+ associatedBashesReferencingMe AssociatedBash[]
238
+ bashNotificationsReferencingMe BashNotification[]
239
+ checkouts Checkout[]
240
+ eventTasks EventTask[]
241
+ videoLink String?
242
+ subtitle String?
243
+ }
244
+
245
+ model Checkout {
246
+ id String @id @default(cuid())
247
+ ownerId String
248
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
249
+ bashEventId String
250
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
251
+ checkoutDateTime DateTime? @default(now())
252
+ tickets Ticket[]
253
+ stripeCheckoutSessionId String? @unique
254
+
255
+ @@index(bashEventId)
256
+ }
257
+
258
+ model TicketTier {
259
+ id String @id @default(cuid())
260
+ bashEventId String
261
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
262
+ tickets Ticket[]
263
+ waitList User[]
264
+ price Int @default(0)
265
+ title String @default("Free")
266
+ sortOrder Int?
267
+ description String?
268
+ maximumNumberOfTickets Int @default(100)
269
+ isDonationTier Boolean?
270
+ hidden Boolean?
271
+ promoCodes BashEventPromoCode[]
272
+
273
+ @@unique([bashEventId, title])
274
+ }
275
+
276
+ model Ticket {
277
+ id String @id @default(cuid())
278
+ ownerId String
279
+ owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
280
+ bashEventId String
281
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
282
+ ticketTierId String?
283
+ ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
284
+ validDate DateTime?
285
+ forUserId String?
286
+ forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
287
+ fullName String?
288
+ email String?
289
+ paidOn DateTime?
290
+ allowPromiseToPay Boolean?
291
+ status TicketStatus?
292
+ isFreeGuest Boolean?
293
+ geoFenceCheckInUnnecessary Boolean?
294
+ checkedInAt DateTime?
295
+ checkedOutAt DateTime?
296
+ invitationId String?
297
+ invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
298
+ checkoutId String?
299
+ checkout Checkout? @relation(fields: [checkoutId], references: [id])
300
+
301
+ @@index([bashEventId])
302
+ }
303
+
304
+ enum TicketStatus {
305
+ Cancelled
306
+ Attended
307
+ Missed
308
+ }
309
+
310
+ model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
311
+ id String @id @default(cuid())
312
+ doNotUseVibeEnum BashEventVibeTags @default(Wild)
313
+ doNotUseDressEnum BashEventDressTags @default(Casual)
314
+ doNotUseBashEventType BashEventType @default(Other)
315
+ doNotUseDayOfWeek DayOfWeek @default(Sunday)
316
+ }
317
+
318
+ model Recurrence {
319
+ id String @id @default(cuid())
320
+ interval Int @default(1)
321
+ bashEventId String @unique
322
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
323
+ frequency RecurringFrequency @default(Never)
324
+ ends DateTime @default(now())
325
+ repeatOnDays DayOfWeek[]
326
+ repeatOnDayOfMonth Int?
327
+ repeatYearlyDate DateTime?
328
+ }
329
+
330
+ enum DayOfWeek {
331
+ Sunday
332
+ Monday
333
+ Tuesday
334
+ Wednesday
335
+ Thursday
336
+ Friday
337
+ Saturday
338
+ }
339
+
340
+ enum RecurringFrequency {
341
+ Never
342
+ Daily
343
+ Weekly
344
+ Monthly
345
+ Yearly
346
+ }
347
+
348
+ enum BashEventVibeTags {
349
+ Wild
350
+ Calm
351
+ }
352
+
353
+ enum BashEventDressTags {
354
+ Casual
355
+ BusinessCasual
356
+ Formal
357
+ }
358
+
359
+ // enum ServicesTags {
360
+ // Fast
361
+ // Reliable
362
+ // AwardRecipient
363
+ // }
364
+
365
+ enum BashEventType {
366
+ AfterParty
367
+ AnimeAndCosplayFestival
368
+ AnniversaryCelebration
369
+ ArtExhibitOpening
370
+ ArtAndCraftNight
371
+ BBQCookout
372
+ BabyShower
373
+ BachelorOrBacheloretteParty
374
+ BeachParty
375
+ Birthday
376
+ BoatPartyOrCruise
377
+ Bonfire
378
+ BookClubMeeting
379
+ BridalShower
380
+ BrunchGathering
381
+ CarShow
382
+ CarnivalAndFair
383
+ CasinoNight
384
+ CasualMixer
385
+ CharityBall
386
+ CharityFundraiser
387
+ ChristmasParty
388
+ ChurchEvent
389
+ CircusOrCarnivalParty
390
+ CocktailParty
391
+ CollegeParty_FraternityOrSorority
392
+ ComedyShowOrStandUpComedyNight
393
+ ComicConvention
394
+ Competition
395
+ Concert
396
+ CookingCompetition
397
+ CorporateEventOrOfficeParty
398
+ CostumeParty_Theme_Based
399
+ CulturalFestival
400
+ DanceParty
401
+ DesertRave
402
+ DiscoNight
403
+ EasterGathering
404
+ EngagementParty
405
+ ESportsGamingTournament
406
+ ExclusiveLuxuryRetreat
407
+ FantasyThemedParty
408
+ FashionShow
409
+ Fireside
410
+ FitnessFestival
411
+ FlashMob
412
+ Festival
413
+ FestivalFilm
414
+ FestivalFood
415
+ FundraisingEvent
416
+ GalaDinner
417
+ GameNight
418
+ GamingEvent
419
+ GardenParty
420
+ GoingAwayPartyOrFarewell
421
+ GraduationParty
422
+ HalloweenCostumeParty
423
+ HanukkahParty
424
+ HistoricalEraParty
425
+ HolidayParty
426
+ HouseParty
427
+ HousewarmingParty
428
+ KaraokeNight
429
+ KiteFlyingFestival
430
+ LiveBandPerformanceInALocalVenue
431
+ Luau
432
+ MansionParty
433
+ MardiGras
434
+ MasqueradeBall
435
+ MotorcycleRally
436
+ MovieNight
437
+ MoviePremiere
438
+ MusicFestival
439
+ NewYearsEveCelebration
440
+ OpenMicNight
441
+ OutdoorActivity
442
+ OutdoorConcert
443
+ OutdoorMovieNight_WithAProjector
444
+ Parade
445
+ Party
446
+ PoolParty
447
+ Potluck
448
+ PotluckVegan
449
+ PreParty
450
+ ProductLaunch
451
+ ProfessionalNetworkingEvent
452
+ Rave_General
453
+ RetirementCelebration
454
+ Reunion_FamilyOrSchoolOrFriends
455
+ SafariAdventureParty
456
+ SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
457
+ ScienceFictionThemedParty
458
+ SocialClubEvent
459
+ SportsTournament
460
+ SportsWatchParty
461
+ SuperheroThemedParty
462
+ SurfCompetition
463
+ ThanksgivingDinner
464
+ ThemedCostumeParty
465
+ ThemedDinnerParty
466
+ ThemedPubCrawl
467
+ Tournament
468
+ TravelAndTradeShow
469
+ TriviaNight
470
+ ValentinesDayParty
471
+ WeddingReception
472
+ WelcomeHomeParty
473
+ WellnessFestival
474
+ WineTastingEvent
475
+ Other
476
+ }
477
+
478
+ model CustomBashEventType {
479
+ id String @id @default(cuid())
480
+ key String @unique
481
+ displayName String
482
+ }
483
+
484
+ model AmountOfGuests {
485
+ id String @id @default(cuid())
486
+ bashEventId String @unique
487
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
488
+ minimum Int? @default(10)
489
+ ideal Int? @default(35)
490
+ showMinimumGuests Boolean @default(true)
491
+ showIdealGuests Boolean @default(true)
492
+ }
493
+
494
+ enum Privacy {
495
+ Public
496
+ ConnectionsOnly
497
+ InviteOnly
498
+ }
499
+
500
+ model TargetAudience {
501
+ id String @id @default(cuid())
502
+ bashEventId String @unique
503
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
504
+ ageRange AgeRange @default(NoPreference)
505
+ gender Gender @default(NoPreference)
506
+ occupation Occupation @default(NoPreference)
507
+ education Education @default(NoPreference)
508
+ showOnDetailPage Boolean @default(true)
509
+ }
510
+
511
+ model ServiceTargetAudience {
512
+ id String @id @default(cuid())
513
+ serviceId String
514
+ ageRange AgeRange @default(NoPreference)
515
+ gender Gender @default(NoPreference)
516
+ occupation Occupation @default(NoPreference)
517
+ education Education @default(NoPreference)
518
+ showOnDetailPage Boolean @default(true)
519
+
520
+ service Service @relation(fields: [serviceId], references: [id])
521
+ }
522
+
523
+ enum AgeRange {
524
+ Eighteen_24
525
+ TwentyFive_34
526
+ ThirtyFive_49
527
+ FiftyPlus
528
+ NoPreference
529
+ }
530
+
531
+ enum Occupation {
532
+ Student
533
+ Startups
534
+ SMBs
535
+ Corporations
536
+ Professional
537
+ AngelInvestors
538
+ FamilyOffice
539
+ Retired
540
+ NoPreference
541
+ }
542
+
543
+ enum Education {
544
+ HighSchool
545
+ InCollege
546
+ Bachelors
547
+ Masters
548
+ Doctorate
549
+ NoPreference
550
+ }
551
+
552
+ enum BashStatus {
553
+ Draft
554
+ PreSale
555
+ Published
556
+ }
557
+
558
+ enum ServiceStatus {
559
+ Draft
560
+ Created
561
+ }
562
+
563
+ model DocumentID {
564
+ id String @id @default(cuid())
565
+ givenName String?
566
+ familyName String?
567
+ middleName String?
568
+ suffix String?
569
+ streetAddress String?
570
+ city String?
571
+ state String?
572
+ stateName String?
573
+ postalCode String?
574
+ idNumber String?
575
+ expires String?
576
+ dob String?
577
+ issueDate String?
578
+ idType String?
579
+ userId String? @unique
580
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
581
+ }
582
+
583
+ model EventLink {
584
+ id String @id @default(cuid())
585
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
586
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
587
+ linkId String
588
+ bashEventId String
589
+ }
590
+
591
+ enum Gender {
592
+ Male
593
+ Female
594
+ Other
595
+ NoPreference
596
+ }
597
+
598
+ model Investment {
599
+ id String @id @default(cuid())
600
+ investorId String
601
+ bashEventId String
602
+ investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
603
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
604
+ amount Float
605
+ type InvestmentType
606
+ paidOn String?
607
+ }
608
+
609
+ enum InvestmentType {
610
+ Equity
611
+ Event
612
+ }
613
+
614
+ model Link {
615
+ id String @id @default(cuid())
616
+ url String
617
+ type String?
618
+ icon String?
619
+ vendorLinks VendorLink[]
620
+ eventLinks EventLink[]
621
+ userLinks UserLink[]
622
+ serviceLinks ServiceLink[]
623
+ }
624
+
625
+ model Media {
626
+ id String @id @default(cuid())
627
+ url String @unique
628
+ type MediaType
629
+ mimetype String?
630
+ bashEventsReferencingMe BashEvent[]
631
+ businessesReferencingMe Business[]
632
+ sponsoredEventsReferencingMe SponsoredEvent[]
633
+ servicesReferencingMe Service[]
634
+ }
635
+
636
+ enum MediaType {
637
+ Unknown
638
+ Empty
639
+ Image
640
+ Video
641
+ }
642
+
643
+ model Prize {
644
+ id String @id @default(cuid())
645
+ prizeWorth Float?
646
+ prizeType PrizeType
647
+ name String
648
+ prizeLevel Int
649
+ description String
650
+ competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
651
+ competitionId String?
652
+ paidOn String?
653
+ winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
654
+ winnerUserId String?
655
+ }
656
+
657
+ enum PrizeType {
658
+ Monetary
659
+ Merchandise
660
+ Service
661
+ Combo
662
+ }
663
+
664
+ model Review {
665
+ id String @id @default(cuid())
666
+ rating Int
667
+ creatorId String
668
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
669
+ bashEventId String
670
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
671
+ comments BashComment[]
672
+ }
673
+
674
+ model Session {
675
+ id String @id @default(cuid())
676
+ sessionToken String @unique
677
+ userId String
678
+ expires DateTime
679
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
680
+
681
+ @@index([userId])
682
+ }
683
+
684
+ enum Sex {
685
+ Male
686
+ Female
687
+ Other
688
+ }
689
+
690
+ model SponsoredEvent {
691
+ id String @id @default(cuid())
692
+ amount Float?
693
+ paidOn String?
694
+ sponsorType SponsorType
695
+ sponsorId String
696
+ bashEventId String
697
+ sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
698
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
699
+ media Media[]
700
+ }
701
+
702
+ enum SponsorType {
703
+ Marketing
704
+ Giveaway
705
+ Awareness
706
+ Trade
707
+ CompetitionPrizeProvider
708
+ }
709
+
710
+ model User {
711
+ id String @id @default(cuid())
712
+ email String @unique
713
+ createdOn DateTime @default(now())
714
+ stripeCustomerId String? @unique
715
+ stripeAccountId String? @unique
716
+ googleCalendarAccess String?
717
+ givenName String?
718
+ familyName String?
719
+ hash String?
720
+ emailVerified DateTime?
721
+ image String?
722
+ uploadedImage String?
723
+ dob DateTime?
724
+ gender Gender?
725
+ sex Sex?
726
+ roles UserRole[] @default([User])
727
+ services Service[]
728
+ createdEvents BashEvent[] @relation("CreatedEvent")
729
+ ticketsISent Ticket[] @relation("TicketsISent")
730
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
731
+ reviews Review[]
732
+ sponsorships SponsoredEvent[]
733
+ investments Investment[]
734
+ sessions Session[]
735
+ eventTasks EventTask[]
736
+ vendors Vendor[]
737
+ clubMembers ClubMember[]
738
+ clubAdmins ClubAdmin[]
739
+ links UserLink[]
740
+ status UserStatus
741
+ competitions Competition[]
742
+ competitionSponsorships CompetitionSponsor[]
743
+ competitionPrizes Prize[]
744
+ userRatingGiven UserRatingGiven[]
745
+ userRating UserRating[]
746
+ magicLink String?
747
+ magicLinkExpiration DateTime?
748
+ magicLinkUsed DateTime?
749
+ idVerified DateTime?
750
+ streetAddress String?
751
+ city String?
752
+ state String?
753
+ postalCode String?
754
+ country String? @default("US")
755
+ phone String?
756
+ documentIDId String? @unique
757
+ documentID DocumentID?
758
+ comment BashComment[]
759
+ associatedBashes AssociatedBash[]
760
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
761
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
762
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
763
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
764
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
765
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
766
+ checkouts Checkout[]
767
+ ticketTiersWaitListsIveJoined TicketTier[]
768
+ contacts Contact[]
769
+ bashEventPromoCodesIUsed BashEventPromoCode[]
770
+ }
771
+
772
+ model Contact {
773
+ id String @id @default(cuid())
774
+ contactOwnerId String
775
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
776
+ contactEmail String?
777
+ fullName String?
778
+ phone String?
779
+ requestToConnectSent DateTime?
780
+ requestToConnectAccepted DateTime?
781
+
782
+ @@unique([contactOwnerId, contactEmail])
783
+ @@index([contactEmail])
784
+ }
785
+
786
+ model AssociatedBash {
787
+ id String @id @default(cuid())
788
+ bashEventId String
789
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
790
+ invitationId String? @unique
791
+ invitation Invitation? @relation(fields: [invitationId], references: [id])
792
+ ownerEmail String?
793
+ ownerUserId String?
794
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
795
+ isOrganizer Boolean?
796
+ isFavorite Boolean?
797
+
798
+ @@unique([ownerEmail, bashEventId])
799
+ }
800
+
801
+ model Service {
802
+ id String @id @default(cuid())
803
+ ownerId String
804
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
805
+ email String
806
+ streetAddress String
807
+ city String
808
+ state String
809
+ postalCode String
810
+ country String
811
+ phone String
812
+ privacy Privacy @default(Public)
813
+ title String
814
+ coverPhoto String?
815
+ media Media[]
816
+ serviceTypes ServiceType[]
817
+ subServiceTypes SubServiceType[]
818
+ serviceTag ServiceTag[]
819
+ customServiceTag String[]
820
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
821
+ serviceLinks ServiceLink[]
822
+ description String?
823
+ canContact Boolean?
824
+ musicGenre MusicGenreType?
825
+ visibility VisibilityPreference @default(Public)
826
+ bashesInterestedIn BashEventType[]
827
+ crowdSizeId String @unique
828
+ crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
829
+ serviceRangeId String @unique
830
+ serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
831
+ availableDateTimes String[] /// Stored in format: ["startDateTime,endDateTime",...]
832
+ serviceTargetAudience ServiceTargetAudience[]
833
+ status ServiceStatus @default(Draft)
834
+
835
+ @@index([email])
836
+ @@index([phone])
837
+ }
838
+
839
+ enum ServiceTag {
840
+ Italian
841
+ }
842
+
843
+ enum SubServiceType {
844
+ Catering
845
+ DJing
846
+ LiveBand
847
+ Photography
848
+ Videography
849
+ }
850
+
851
+ enum YearsOfExperience {
852
+ LessThanOneYear
853
+ OneToThreeYears
854
+ ThreeToFiveYears
855
+ FivePlusYears
856
+ }
857
+
858
+ model ServiceRange {
859
+ id String @id @default(cuid())
860
+ min Int @default(0)
861
+ max Int @default(50)
862
+ serviceCrowdSize Service? @relation("CrowdSize")
863
+ serviceServiceRange Service? @relation("ServiceRange")
864
+ }
865
+
866
+ model Availability {
867
+ id String @id @default(cuid())
868
+ startDateTime String
869
+ endDateTime String
870
+ }
871
+
872
+ enum VisibilityPreference {
873
+ Public
874
+ Private
875
+ }
876
+
877
+ enum MusicGenreType {
878
+ Classical
879
+ Rock
880
+ HipHop
881
+ Country
882
+ Pop
883
+ EDM
884
+ Indie
885
+ Acoustic
886
+ }
887
+
888
+ enum ServiceType {
889
+ EventService
890
+ EntertainmentService
891
+ Volunteer
892
+ PartnerService
893
+ Venue
894
+ Vendor
895
+ Exhibitor
896
+ Sponsor
897
+ Organization
898
+ }
899
+
900
+ enum UserRole {
901
+ User
902
+ Vendor
903
+ Sponsor
904
+ Investor
905
+ LoanProvider
906
+ VenueProvider
907
+ ServiceProvider
908
+ SuperAdmin
909
+ Exhibitor
910
+ }
911
+
912
+ model UserLink {
913
+ id String @id @default(cuid())
914
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
915
+ linkId String
916
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
917
+ userId String
918
+ }
919
+
920
+ model UserRating {
921
+ id String @id @default(cuid())
922
+ rating Int
923
+ comment String?
924
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
925
+ userRatingGivenId String
926
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
927
+ userId String
928
+ }
929
+
930
+ model UserRatingGiven {
931
+ id String @id @default(cuid())
932
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
933
+ userId String
934
+ UserRating UserRating[]
935
+ }
936
+
937
+ enum UserStatus {
938
+ Active
939
+ Inactive
940
+ Suspended
941
+ Deactivated
942
+ }
943
+
944
+ model VerificationToken {
945
+ identifier String
946
+ token String @unique
947
+ expires DateTime
948
+
949
+ @@unique([identifier, token])
950
+ }
951
+
952
+ model Vendor {
953
+ id String @id @default(cuid())
954
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
955
+ ownerId String
956
+ type String
957
+ amount Float?
958
+ paidOn String?
959
+ links VendorLink[]
960
+ }
961
+
962
+ model VendorLink {
963
+ id String @id @default(cuid())
964
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
965
+ vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
966
+ linkId String
967
+ vendorId String
968
+ }
969
+
970
+ model ServiceLink {
971
+ id String @id @default(cuid())
972
+ serviceId String
973
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
974
+ linkId String
975
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
976
+
977
+ @@index([serviceId])
978
+ }