@bash-app/bash-common 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,961 +1,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
-
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
+
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
+ }