@bash-app/bash-common 9.0.0 → 9.2.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,973 +1,975 @@
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
- bashEventId String
139
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
140
- code String
141
- stripeCouponId String?
142
- discountAmountInCents Int?
143
- discountAmountPercentage Int?
144
- maxRedemptions Int?
145
- redeemBy DateTime?
146
- usedBy User[]
147
-
148
- @@unique([bashEventId, 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
- promoCodes BashEventPromoCode[]
244
- }
245
-
246
- model Checkout {
247
- id String @id @default(cuid())
248
- ownerId String
249
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
250
- bashEventId String
251
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
252
- checkoutDateTime DateTime? @default(now())
253
- tickets Ticket[]
254
- stripeCheckoutSessionId String? @unique
255
-
256
- @@index(bashEventId)
257
- }
258
-
259
- model TicketTier {
260
- id String @id @default(cuid())
261
- bashEventId String
262
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
263
- tickets Ticket[]
264
- waitList User[]
265
- price Int @default(0)
266
- title String @default("Free")
267
- maximumNumberOfTickets Int @default(100)
268
- isDonationTier Boolean?
269
- hidden Boolean?
270
-
271
- @@unique([bashEventId, title])
272
- }
273
-
274
- model Ticket {
275
- id String @id @default(cuid())
276
- ownerId String
277
- owner User @relation("TicketsIOwn", fields: [ownerId], references: [id], onDelete: Cascade)
278
- bashEventId String
279
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
280
- ticketTierId String?
281
- ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id], onDelete: Cascade)
282
- validDate DateTime?
283
- forUserId String?
284
- forUser User? @relation("TicketsISent", fields: [forUserId], references: [id], onDelete: Cascade)
285
- fullName String?
286
- email String?
287
- paidOn DateTime?
288
- allowPromiseToPay Boolean?
289
- status TicketStatus?
290
- isFreeGuest Boolean?
291
- geoFenceCheckInUnnecessary Boolean?
292
- checkedInAt DateTime?
293
- checkedOutAt DateTime?
294
- invitationId String?
295
- invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id], onDelete: SetNull)
296
- checkoutId String?
297
- checkout Checkout? @relation(fields: [checkoutId], references: [id], onDelete: SetNull)
298
-
299
- @@index([bashEventId])
300
- }
301
-
302
- enum TicketStatus {
303
- Cancelled
304
- Attended
305
- Missed
306
- }
307
-
308
- model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
309
- id String @id @default(cuid())
310
- doNotUseVibeEnum BashEventVibeTags @default(Wild)
311
- doNotUseDressEnum BashEventDressTags @default(Casual)
312
- doNotUseBashEventType BashEventType @default(Other)
313
- doNotUseDayOfWeek DayOfWeek @default(Sunday)
314
- }
315
-
316
- model Recurrence {
317
- id String @id @default(cuid())
318
- interval Int @default(1)
319
- bashEventId String @unique
320
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
321
- frequency RecurringFrequency @default(Never)
322
- ends DateTime @default(now())
323
- repeatOnDays DayOfWeek[]
324
- repeatOnDayOfMonth Int?
325
- repeatYearlyDate DateTime?
326
- }
327
-
328
- enum DayOfWeek {
329
- Sunday
330
- Monday
331
- Tuesday
332
- Wednesday
333
- Thursday
334
- Friday
335
- Saturday
336
- }
337
-
338
- enum RecurringFrequency {
339
- Never
340
- Daily
341
- Weekly
342
- Monthly
343
- Yearly
344
- }
345
-
346
- enum BashEventVibeTags {
347
- Wild
348
- Calm
349
- }
350
-
351
- enum BashEventDressTags {
352
- Casual
353
- BusinessCasual
354
- Formal
355
- }
356
-
357
- // enum ServicesTags {
358
- // Fast
359
- // Reliable
360
- // AwardRecipient
361
- // }
362
-
363
- enum BashEventType {
364
- AfterParty
365
- AnimeAndCosplayFestival
366
- AnniversaryCelebration
367
- ArtExhibitOpening
368
- ArtAndCraftNight
369
- BBQCookout
370
- BabyShower
371
- BachelorOrBacheloretteParty
372
- BeachParty
373
- Birthday
374
- BoatPartyOrCruise
375
- Bonfire
376
- BookClubMeeting
377
- BridalShower
378
- BrunchGathering
379
- CarShow
380
- CarnivalAndFair
381
- CasinoNight
382
- CasualMixer
383
- CharityBall
384
- CharityFundraiser
385
- ChristmasParty
386
- ChurchEvent
387
- CircusOrCarnivalParty
388
- CocktailParty
389
- CollegeParty_FraternityOrSorority
390
- ComedyShowOrStandUpComedyNight
391
- ComicConvention
392
- Competition
393
- Concert
394
- CookingCompetition
395
- CorporateEventOrOfficeParty
396
- CostumeParty_Theme_Based
397
- CulturalFestival
398
- DanceParty
399
- DesertRave
400
- DiscoNight
401
- EasterGathering
402
- EngagementParty
403
- ESportsGamingTournament
404
- ExclusiveLuxuryRetreat
405
- FantasyThemedParty
406
- FashionShow
407
- Fireside
408
- FitnessFestival
409
- FlashMob
410
- Festival
411
- FestivalFilm
412
- FestivalFood
413
- FundraisingEvent
414
- GalaDinner
415
- GameNight
416
- GamingEvent
417
- GardenParty
418
- GoingAwayPartyOrFarewell
419
- GraduationParty
420
- HalloweenCostumeParty
421
- HanukkahParty
422
- HistoricalEraParty
423
- HolidayParty
424
- HouseParty
425
- HousewarmingParty
426
- KaraokeNight
427
- KiteFlyingFestival
428
- LiveBandPerformanceInALocalVenue
429
- Luau
430
- MansionParty
431
- MardiGras
432
- MasqueradeBall
433
- MotorcycleRally
434
- MovieNight
435
- MoviePremiere
436
- MusicFestival
437
- NewYearsEveCelebration
438
- OpenMicNight
439
- OutdoorActivity
440
- OutdoorConcert
441
- OutdoorMovieNight_WithAProjector
442
- Parade
443
- Party
444
- PoolParty
445
- Potluck
446
- PotluckVegan
447
- PreParty
448
- ProductLaunch
449
- ProfessionalNetworkingEvent
450
- Rave_General
451
- RetirementCelebration
452
- Reunion_FamilyOrSchoolOrFriends
453
- SafariAdventureParty
454
- SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
455
- ScienceFictionThemedParty
456
- SocialClubEvent
457
- SportsTournament
458
- SportsWatchParty
459
- SuperheroThemedParty
460
- SurfCompetition
461
- ThanksgivingDinner
462
- ThemedCostumeParty
463
- ThemedDinnerParty
464
- ThemedPubCrawl
465
- Tournament
466
- TravelAndTradeShow
467
- TriviaNight
468
- ValentinesDayParty
469
- WeddingReception
470
- WelcomeHomeParty
471
- WellnessFestival
472
- WineTastingEvent
473
- Other
474
- }
475
-
476
- model CustomBashEventType {
477
- id String @id @default(cuid())
478
- key String @unique
479
- displayName String
480
- }
481
-
482
- model AmountOfGuests {
483
- id String @id @default(cuid())
484
- bashEventId String @unique
485
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
486
- minimum Int? @default(10)
487
- ideal Int? @default(35)
488
- showMinimumGuests Boolean @default(true)
489
- showIdealGuests Boolean @default(true)
490
- }
491
-
492
- enum Privacy {
493
- Public
494
- ConnectionsOnly
495
- InviteOnly
496
- }
497
-
498
- model TargetAudience {
499
- id String @id @default(cuid())
500
- bashEventId String @unique
501
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
502
- ageRange AgeRange @default(NoPreference)
503
- gender Gender @default(NoPreference)
504
- occupation Occupation @default(NoPreference)
505
- education Education @default(NoPreference)
506
- showOnDetailPage Boolean @default(true)
507
- }
508
-
509
- model ServiceTargetAudience {
510
- id String @id @default(cuid())
511
- serviceId String
512
- ageRange AgeRange @default(NoPreference)
513
- gender Gender @default(NoPreference)
514
- occupation Occupation @default(NoPreference)
515
- education Education @default(NoPreference)
516
- showOnDetailPage Boolean @default(true)
517
-
518
- service Service @relation(fields: [serviceId], references: [id])
519
- }
520
-
521
- enum AgeRange {
522
- Eighteen_24
523
- TwentyFive_34
524
- ThirtyFive_49
525
- FiftyPlus
526
- NoPreference
527
- }
528
-
529
- enum Occupation {
530
- Student
531
- Startups
532
- SMBs
533
- Corporations
534
- Professional
535
- AngelInvestors
536
- FamilyOffice
537
- Retired
538
- NoPreference
539
- }
540
-
541
- enum Education {
542
- HighSchool
543
- InCollege
544
- Bachelors
545
- Masters
546
- Doctorate
547
- NoPreference
548
- }
549
-
550
- enum BashStatus {
551
- Draft
552
- PreSale
553
- Published
554
- }
555
-
556
- model DocumentID {
557
- id String @id @default(cuid())
558
- givenName String?
559
- familyName String?
560
- middleName String?
561
- suffix String?
562
- streetAddress String?
563
- city String?
564
- state String?
565
- stateName String?
566
- postalCode String?
567
- idNumber String?
568
- expires String?
569
- dob String?
570
- issueDate String?
571
- idType String?
572
- userId String? @unique
573
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
574
- }
575
-
576
- model EventLink {
577
- id String @id @default(cuid())
578
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
579
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
580
- linkId String
581
- bashEventId String
582
- }
583
-
584
- enum Gender {
585
- Male
586
- Female
587
- Other
588
- NoPreference
589
- }
590
-
591
- model Investment {
592
- id String @id @default(cuid())
593
- investorId String
594
- bashEventId String
595
- investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
596
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
597
- amount Float
598
- type InvestmentType
599
- paidOn String?
600
- }
601
-
602
- enum InvestmentType {
603
- Equity
604
- Event
605
- }
606
-
607
- model Link {
608
- id String @id @default(cuid())
609
- url String
610
- type String
611
- icon String?
612
- vendorLinks VendorLink[]
613
- eventLinks EventLink[]
614
- userLinks UserLink[]
615
- serviceLinks ServiceLink[]
616
- }
617
-
618
- model Media {
619
- id String @id @default(cuid())
620
- url String @unique
621
- type MediaType
622
- mimetype String?
623
- bashEventsReferencingMe BashEvent[]
624
- businessesReferencingMe Business[]
625
- sponsoredEventsReferencingMe SponsoredEvent[]
626
- servicesReferencingMe Service[]
627
- }
628
-
629
- enum MediaType {
630
- Unknown
631
- Empty
632
- Image
633
- Video
634
- }
635
-
636
- model Prize {
637
- id String @id @default(cuid())
638
- prizeWorth Float?
639
- prizeType PrizeType
640
- name String
641
- prizeLevel Int
642
- description String
643
- competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
644
- competitionId String?
645
- paidOn String?
646
- winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
647
- winnerUserId String?
648
- }
649
-
650
- enum PrizeType {
651
- Monetary
652
- Merchandise
653
- Service
654
- Combo
655
- }
656
-
657
- model Review {
658
- id String @id @default(cuid())
659
- rating Int
660
- creatorId String
661
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
662
- bashEventId String
663
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
664
- comments BashComment[]
665
- }
666
-
667
- model Session {
668
- id String @id @default(cuid())
669
- sessionToken String @unique
670
- userId String
671
- expires DateTime
672
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
673
-
674
- @@index([userId])
675
- }
676
-
677
- enum Sex {
678
- Male
679
- Female
680
- Other
681
- }
682
-
683
- model SponsoredEvent {
684
- id String @id @default(cuid())
685
- amount Float?
686
- paidOn String?
687
- sponsorType SponsorType
688
- sponsorId String
689
- bashEventId String
690
- sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
691
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
692
- media Media[]
693
- }
694
-
695
- enum SponsorType {
696
- Marketing
697
- Giveaway
698
- Awareness
699
- Trade
700
- CompetitionPrizeProvider
701
- }
702
-
703
- model User {
704
- id String @id @default(cuid())
705
- email String @unique
706
- createdOn DateTime @default(now())
707
- stripeCustomerId String? @unique
708
- stripeAccountId String? @unique
709
- googleCalendarAccess String?
710
- username String?
711
- fullName String?
712
- givenName String?
713
- familyName String?
714
- hash String?
715
- emailVerified DateTime?
716
- image String?
717
- uploadedImage String?
718
- dob DateTime?
719
- gender Gender?
720
- sex Sex?
721
- roles UserRole[] @default([User])
722
- services Service[]
723
- createdEvents BashEvent[] @relation("CreatedEvent")
724
- ticketsISent Ticket[] @relation("TicketsISent")
725
- ticketsIOwn Ticket[] @relation("TicketsIOwn")
726
- reviews Review[]
727
- sponsorships SponsoredEvent[]
728
- investments Investment[]
729
- sessions Session[]
730
- eventTasks EventTask[]
731
- vendors Vendor[]
732
- clubMembers ClubMember[]
733
- clubAdmins ClubAdmin[]
734
- links UserLink[]
735
- status UserStatus
736
- competitions Competition[]
737
- competitionSponsorships CompetitionSponsor[]
738
- competitionPrizes Prize[]
739
- userRatingGiven UserRatingGiven[]
740
- userRating UserRating[]
741
- magicLink String?
742
- magicLinkExpiration DateTime?
743
- magicLinkUsed DateTime?
744
- idVerified DateTime?
745
- streetAddress String?
746
- city String?
747
- state String?
748
- postalCode String?
749
- country String? @default("US")
750
- phone String?
751
- documentIDId String? @unique
752
- documentID DocumentID?
753
- comment BashComment[]
754
- associatedBashes AssociatedBash[]
755
- invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
756
- invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
757
- notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
758
- remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
759
- remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
760
- eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
761
- checkouts Checkout[]
762
- ticketTiersWaitListsIveJoined TicketTier[]
763
- contacts Contact[]
764
- contactsReferencingMe Contact[] @relation("ContactsReferencingMe")
765
- bashEventPromoCodesIUsed BashEventPromoCode[]
766
- }
767
-
768
- model Contact {
769
- id String @id @default(cuid())
770
- contactOwnerId String
771
- contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
772
- email String?
773
- fullName String?
774
- phone String?
775
- contactUserId String?
776
- contactUser User? @relation("ContactsReferencingMe", fields: [contactUserId], references: [id], onDelete: Cascade)
777
- requestToConnectSent DateTime?
778
- requestToConnectAccepted DateTime?
779
-
780
- @@unique([contactOwnerId, email])
781
- @@index([email])
782
- }
783
-
784
- model AssociatedBash {
785
- id String @id @default(cuid())
786
- bashEventId String
787
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
788
- invitationId String? @unique
789
- invitation Invitation? @relation(fields: [invitationId], references: [id])
790
- ownerEmail String?
791
- ownerUserId String?
792
- owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
793
- isOrganizer Boolean?
794
- isFavorite Boolean?
795
-
796
- @@unique([ownerEmail, bashEventId])
797
- }
798
-
799
- model Service {
800
- id String @id @default(cuid())
801
- ownerId String
802
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
803
- email String
804
- streetAddress String
805
- city String
806
- state String
807
- postalCode String
808
- country String
809
- phone String
810
- privacy Privacy @default(Public)
811
- title String @unique
812
- coverPhoto String?
813
- media Media[]
814
- serviceTypes ServiceType[]
815
- subServiceTypes SubServiceType[]
816
- serviceTag ServiceTag[]
817
- customServiceTag String[]
818
- yearsOfExperince YearsOfExperience @default(LessThanOneYear)
819
- serviceLinks ServiceLink[]
820
- description String?
821
- canContact Boolean?
822
- musicGenre MusicGenreType?
823
- visibility VisibilityPreference @default(Public)
824
- bashesInterestedIn BashEventType[]
825
- crowdSizeId String @unique
826
- crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
827
- serviceRangeId String @unique
828
- serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
829
- availableDateTimes DateTime?
830
- serviceTargetAudience ServiceTargetAudience[]
831
-
832
- @@index([email])
833
- @@index([phone])
834
- }
835
-
836
- enum ServiceTag {
837
- Italian
838
- }
839
-
840
- enum SubServiceType {
841
- Catering
842
- DJing
843
- LiveBand
844
- Photography
845
- Videography
846
- }
847
-
848
- enum YearsOfExperience {
849
- LessThanOneYear
850
- OneToThreeYears
851
- ThreeToFiveYears
852
- FivePlusYears
853
- }
854
-
855
- model ServiceRange {
856
- id String @id @default(cuid())
857
- min Int @default(0)
858
- max Int @default(50)
859
- serviceCrowdSize Service? @relation("CrowdSize")
860
- serviceServiceRange Service? @relation("ServiceRange")
861
- }
862
-
863
- model Availability {
864
- id String @id @default(cuid())
865
- startDateTime String
866
- endDateTime String
867
- }
868
-
869
- enum VisibilityPreference {
870
- Public
871
- Private
872
- }
873
-
874
- enum MusicGenreType {
875
- Classical
876
- Rock
877
- HipHop
878
- Country
879
- Pop
880
- EDM
881
- Indie
882
- Acoustic
883
- }
884
-
885
- enum ServiceType {
886
- EventService
887
- EntertainmentService
888
- Volunteer
889
- PartnerService
890
- Venue
891
- Vendor
892
- Exhibitor
893
- Sponsor
894
- Organization
895
- }
896
-
897
- enum UserRole {
898
- User
899
- Vendor
900
- Sponsor
901
- Investor
902
- LoanProvider
903
- VenueProvider
904
- ServiceProvider
905
- SuperAdmin
906
- Exhibitor
907
- }
908
-
909
- model UserLink {
910
- id String @id @default(cuid())
911
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
912
- linkId String
913
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
914
- userId String
915
- }
916
-
917
- model UserRating {
918
- id String @id @default(cuid())
919
- rating Int
920
- comment String?
921
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
922
- userRatingGivenId String
923
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
924
- userId String
925
- }
926
-
927
- model UserRatingGiven {
928
- id String @id @default(cuid())
929
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
930
- userId String
931
- UserRating UserRating[]
932
- }
933
-
934
- enum UserStatus {
935
- Active
936
- Inactive
937
- Suspended
938
- Deactivated
939
- }
940
-
941
- model VerificationToken {
942
- identifier String
943
- token String @unique
944
- expires DateTime
945
-
946
- @@unique([identifier, token])
947
- }
948
-
949
- model Vendor {
950
- id String @id @default(cuid())
951
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
952
- ownerId String
953
- type String
954
- amount Float?
955
- paidOn String?
956
- links VendorLink[]
957
- }
958
-
959
- model VendorLink {
960
- id String @id @default(cuid())
961
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
962
- vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
963
- linkId String
964
- vendorId String
965
- }
966
-
967
- model ServiceLink {
968
- id String @id @default(cuid())
969
- servicesId String
970
- service Service @relation(fields: [servicesId], references: [id], onDelete: Cascade)
971
- linkId String
972
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
973
- }
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
+ bashEventId String
139
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
140
+ code String
141
+ stripeCouponId String?
142
+ discountAmountInCents Int?
143
+ discountAmountPercentage Int?
144
+ maxRedemptions Int?
145
+ redeemBy DateTime?
146
+ usedBy User[]
147
+
148
+ @@unique([bashEventId, 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
+ promoCodes BashEventPromoCode[]
244
+ }
245
+
246
+ model Checkout {
247
+ id String @id @default(cuid())
248
+ ownerId String
249
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
250
+ bashEventId String
251
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
252
+ checkoutDateTime DateTime? @default(now())
253
+ tickets Ticket[]
254
+ stripeCheckoutSessionId String? @unique
255
+
256
+ @@index(bashEventId)
257
+ }
258
+
259
+ model TicketTier {
260
+ id String @id @default(cuid())
261
+ bashEventId String
262
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
263
+ tickets Ticket[]
264
+ waitList User[]
265
+ price Int @default(0)
266
+ title String @default("Free")
267
+ sortOrder Int?
268
+ description String?
269
+ maximumNumberOfTickets Int @default(100)
270
+ isDonationTier Boolean?
271
+ hidden Boolean?
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
+ model DocumentID {
559
+ id String @id @default(cuid())
560
+ givenName String?
561
+ familyName String?
562
+ middleName String?
563
+ suffix String?
564
+ streetAddress String?
565
+ city String?
566
+ state String?
567
+ stateName String?
568
+ postalCode String?
569
+ idNumber String?
570
+ expires String?
571
+ dob String?
572
+ issueDate String?
573
+ idType String?
574
+ userId String? @unique
575
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
576
+ }
577
+
578
+ model EventLink {
579
+ id String @id @default(cuid())
580
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
581
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
582
+ linkId String
583
+ bashEventId String
584
+ }
585
+
586
+ enum Gender {
587
+ Male
588
+ Female
589
+ Other
590
+ NoPreference
591
+ }
592
+
593
+ model Investment {
594
+ id String @id @default(cuid())
595
+ investorId String
596
+ bashEventId String
597
+ investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
598
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
599
+ amount Float
600
+ type InvestmentType
601
+ paidOn String?
602
+ }
603
+
604
+ enum InvestmentType {
605
+ Equity
606
+ Event
607
+ }
608
+
609
+ model Link {
610
+ id String @id @default(cuid())
611
+ url String
612
+ type String
613
+ icon String?
614
+ vendorLinks VendorLink[]
615
+ eventLinks EventLink[]
616
+ userLinks UserLink[]
617
+ serviceLinks ServiceLink[]
618
+ }
619
+
620
+ model Media {
621
+ id String @id @default(cuid())
622
+ url String @unique
623
+ type MediaType
624
+ mimetype String?
625
+ bashEventsReferencingMe BashEvent[]
626
+ businessesReferencingMe Business[]
627
+ sponsoredEventsReferencingMe SponsoredEvent[]
628
+ servicesReferencingMe Service[]
629
+ }
630
+
631
+ enum MediaType {
632
+ Unknown
633
+ Empty
634
+ Image
635
+ Video
636
+ }
637
+
638
+ model Prize {
639
+ id String @id @default(cuid())
640
+ prizeWorth Float?
641
+ prizeType PrizeType
642
+ name String
643
+ prizeLevel Int
644
+ description String
645
+ competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
646
+ competitionId String?
647
+ paidOn String?
648
+ winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
649
+ winnerUserId String?
650
+ }
651
+
652
+ enum PrizeType {
653
+ Monetary
654
+ Merchandise
655
+ Service
656
+ Combo
657
+ }
658
+
659
+ model Review {
660
+ id String @id @default(cuid())
661
+ rating Int
662
+ creatorId String
663
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
664
+ bashEventId String
665
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
666
+ comments BashComment[]
667
+ }
668
+
669
+ model Session {
670
+ id String @id @default(cuid())
671
+ sessionToken String @unique
672
+ userId String
673
+ expires DateTime
674
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
675
+
676
+ @@index([userId])
677
+ }
678
+
679
+ enum Sex {
680
+ Male
681
+ Female
682
+ Other
683
+ }
684
+
685
+ model SponsoredEvent {
686
+ id String @id @default(cuid())
687
+ amount Float?
688
+ paidOn String?
689
+ sponsorType SponsorType
690
+ sponsorId String
691
+ bashEventId String
692
+ sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
693
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
694
+ media Media[]
695
+ }
696
+
697
+ enum SponsorType {
698
+ Marketing
699
+ Giveaway
700
+ Awareness
701
+ Trade
702
+ CompetitionPrizeProvider
703
+ }
704
+
705
+ model User {
706
+ id String @id @default(cuid())
707
+ email String @unique
708
+ createdOn DateTime @default(now())
709
+ stripeCustomerId String? @unique
710
+ stripeAccountId String? @unique
711
+ googleCalendarAccess String?
712
+ username String?
713
+ fullName String?
714
+ givenName String?
715
+ familyName String?
716
+ hash String?
717
+ emailVerified DateTime?
718
+ image String?
719
+ uploadedImage String?
720
+ dob DateTime?
721
+ gender Gender?
722
+ sex Sex?
723
+ roles UserRole[] @default([User])
724
+ services Service[]
725
+ createdEvents BashEvent[] @relation("CreatedEvent")
726
+ ticketsISent Ticket[] @relation("TicketsISent")
727
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
728
+ reviews Review[]
729
+ sponsorships SponsoredEvent[]
730
+ investments Investment[]
731
+ sessions Session[]
732
+ eventTasks EventTask[]
733
+ vendors Vendor[]
734
+ clubMembers ClubMember[]
735
+ clubAdmins ClubAdmin[]
736
+ links UserLink[]
737
+ status UserStatus
738
+ competitions Competition[]
739
+ competitionSponsorships CompetitionSponsor[]
740
+ competitionPrizes Prize[]
741
+ userRatingGiven UserRatingGiven[]
742
+ userRating UserRating[]
743
+ magicLink String?
744
+ magicLinkExpiration DateTime?
745
+ magicLinkUsed DateTime?
746
+ idVerified DateTime?
747
+ streetAddress String?
748
+ city String?
749
+ state String?
750
+ postalCode String?
751
+ country String? @default("US")
752
+ phone String?
753
+ documentIDId String? @unique
754
+ documentID DocumentID?
755
+ comment BashComment[]
756
+ associatedBashes AssociatedBash[]
757
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
758
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
759
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
760
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
761
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
762
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
763
+ checkouts Checkout[]
764
+ ticketTiersWaitListsIveJoined TicketTier[]
765
+ contacts Contact[]
766
+ contactsReferencingMe Contact[] @relation("ContactsReferencingMe")
767
+ bashEventPromoCodesIUsed BashEventPromoCode[]
768
+ }
769
+
770
+ model Contact {
771
+ id String @id @default(cuid())
772
+ contactOwnerId String
773
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
774
+ email String?
775
+ fullName String?
776
+ phone String?
777
+ contactUserId String?
778
+ contactUser User? @relation("ContactsReferencingMe", fields: [contactUserId], references: [id], onDelete: Cascade)
779
+ requestToConnectSent DateTime?
780
+ requestToConnectAccepted DateTime?
781
+
782
+ @@unique([contactOwnerId, email])
783
+ @@index([email])
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 @unique
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 DateTime?
832
+ serviceTargetAudience ServiceTargetAudience[]
833
+
834
+ @@index([email])
835
+ @@index([phone])
836
+ }
837
+
838
+ enum ServiceTag {
839
+ Italian
840
+ }
841
+
842
+ enum SubServiceType {
843
+ Catering
844
+ DJing
845
+ LiveBand
846
+ Photography
847
+ Videography
848
+ }
849
+
850
+ enum YearsOfExperience {
851
+ LessThanOneYear
852
+ OneToThreeYears
853
+ ThreeToFiveYears
854
+ FivePlusYears
855
+ }
856
+
857
+ model ServiceRange {
858
+ id String @id @default(cuid())
859
+ min Int @default(0)
860
+ max Int @default(50)
861
+ serviceCrowdSize Service? @relation("CrowdSize")
862
+ serviceServiceRange Service? @relation("ServiceRange")
863
+ }
864
+
865
+ model Availability {
866
+ id String @id @default(cuid())
867
+ startDateTime String
868
+ endDateTime String
869
+ }
870
+
871
+ enum VisibilityPreference {
872
+ Public
873
+ Private
874
+ }
875
+
876
+ enum MusicGenreType {
877
+ Classical
878
+ Rock
879
+ HipHop
880
+ Country
881
+ Pop
882
+ EDM
883
+ Indie
884
+ Acoustic
885
+ }
886
+
887
+ enum ServiceType {
888
+ EventService
889
+ EntertainmentService
890
+ Volunteer
891
+ PartnerService
892
+ Venue
893
+ Vendor
894
+ Exhibitor
895
+ Sponsor
896
+ Organization
897
+ }
898
+
899
+ enum UserRole {
900
+ User
901
+ Vendor
902
+ Sponsor
903
+ Investor
904
+ LoanProvider
905
+ VenueProvider
906
+ ServiceProvider
907
+ SuperAdmin
908
+ Exhibitor
909
+ }
910
+
911
+ model UserLink {
912
+ id String @id @default(cuid())
913
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
914
+ linkId String
915
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
916
+ userId String
917
+ }
918
+
919
+ model UserRating {
920
+ id String @id @default(cuid())
921
+ rating Int
922
+ comment String?
923
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
924
+ userRatingGivenId String
925
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
926
+ userId String
927
+ }
928
+
929
+ model UserRatingGiven {
930
+ id String @id @default(cuid())
931
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
932
+ userId String
933
+ UserRating UserRating[]
934
+ }
935
+
936
+ enum UserStatus {
937
+ Active
938
+ Inactive
939
+ Suspended
940
+ Deactivated
941
+ }
942
+
943
+ model VerificationToken {
944
+ identifier String
945
+ token String @unique
946
+ expires DateTime
947
+
948
+ @@unique([identifier, token])
949
+ }
950
+
951
+ model Vendor {
952
+ id String @id @default(cuid())
953
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
954
+ ownerId String
955
+ type String
956
+ amount Float?
957
+ paidOn String?
958
+ links VendorLink[]
959
+ }
960
+
961
+ model VendorLink {
962
+ id String @id @default(cuid())
963
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
964
+ vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
965
+ linkId String
966
+ vendorId String
967
+ }
968
+
969
+ model ServiceLink {
970
+ id String @id @default(cuid())
971
+ servicesId String
972
+ service Service @relation(fields: [servicesId], references: [id], onDelete: Cascade)
973
+ linkId String
974
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
975
+ }