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