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