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