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