@bash-app/bash-common 15.0.0 → 15.1.1

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,1007 +1,1007 @@
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
- media Media[]
818
- serviceTypes ServiceType[]
819
- subServiceTypes SubServiceType[]
820
- serviceTag ServiceTag[]
821
- customServiceTag String[]
822
- yearsOfExperince YearsOfExperience @default(LessThanOneYear)
823
- serviceLinks ServiceLink[]
824
- description String?
825
- canContact Boolean?
826
- musicGenre MusicGenreType?
827
- visibility VisibilityPreference @default(Public)
828
- bashesInterestedIn BashEventType[]
829
- crowdSizeId String @unique
830
- crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
831
- serviceRangeId String @unique
832
- serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
833
- availableDateTimes String[] /// Stored in format: ["startDateTime,endDateTime",...]
834
- serviceTargetAudience ServiceTargetAudience[]
835
- status ServiceStatus @default(Draft)
836
- venues Venue[]
837
-
838
- @@index([email])
839
- @@index([phone])
840
- }
841
-
842
- model Venue {
843
- id String @id @default(cuid())
844
- service Service? @relation(fields: [serviceId], references: [id])
845
- serviceId String?
846
- venueName String
847
- capacity Int?
848
- amenities String[]
849
- additionalInfo String?
850
- features String[]
851
- venueTypes String[]
852
- availableDateTimes Availability[] @relation("AvailableDateTimes")
853
- // specialDateTimes Availability[] @relation("SpecialDateTimes")
854
- mission String?
855
- pitch String?
856
- communityInvolvement String?
857
- emergencyContact String?
858
- contactDetails String?
859
- rates String?
860
- cancellationPolicy String?
861
- refundPolicy String?
862
- safetyPolicy String?
863
- }
864
-
865
- enum ServiceTag {
866
- Italian
867
- }
868
-
869
- enum SubServiceType {
870
- Catering
871
- DJing
872
- LiveBand
873
- Photography
874
- Videography
875
- }
876
-
877
- enum YearsOfExperience {
878
- LessThanOneYear
879
- OneToThreeYears
880
- ThreeToFiveYears
881
- FivePlusYears
882
- }
883
-
884
- model ServiceRange {
885
- id String @id @default(cuid())
886
- min Int @default(0)
887
- max Int @default(50)
888
- serviceCrowdSize Service? @relation("CrowdSize")
889
- serviceServiceRange Service? @relation("ServiceRange")
890
- }
891
-
892
- model Availability {
893
- id String @id @default(cuid())
894
- startDateTime String
895
- endDateTime String
896
- venueId String?
897
- venueAvailableDateTimes Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
898
- // venueSpecialDateTimes Venue? @relation("SpecialDateTimes", fields: [venueId], references: [id])
899
- }
900
-
901
- enum VisibilityPreference {
902
- Public
903
- Private
904
- }
905
-
906
- enum MusicGenreType {
907
- Classical
908
- Rock
909
- HipHop
910
- Country
911
- Pop
912
- EDM
913
- Indie
914
- Acoustic
915
- }
916
-
917
- enum ServiceType {
918
- EventService
919
- EntertainmentService
920
- Volunteer
921
- PartnerService
922
- Venue
923
- Vendor
924
- Exhibitor
925
- Sponsor
926
- Organization
927
- }
928
-
929
- enum UserRole {
930
- User
931
- Vendor
932
- Sponsor
933
- Investor
934
- LoanProvider
935
- VenueProvider
936
- ServiceProvider
937
- SuperAdmin
938
- Exhibitor
939
- }
940
-
941
- model UserLink {
942
- id String @id @default(cuid())
943
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
944
- linkId String
945
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
946
- userId String
947
- }
948
-
949
- model UserRating {
950
- id String @id @default(cuid())
951
- rating Int
952
- comment String?
953
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
954
- userRatingGivenId String
955
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
956
- userId String
957
- }
958
-
959
- model UserRatingGiven {
960
- id String @id @default(cuid())
961
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
962
- userId String
963
- UserRating UserRating[]
964
- }
965
-
966
- enum UserStatus {
967
- Active
968
- Inactive
969
- Suspended
970
- Deactivated
971
- }
972
-
973
- model VerificationToken {
974
- identifier String
975
- token String @unique
976
- expires DateTime
977
-
978
- @@unique([identifier, token])
979
- }
980
-
981
- model Vendor {
982
- id String @id @default(cuid())
983
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
984
- ownerId String
985
- type String
986
- amount Float?
987
- paidOn String?
988
- links VendorLink[]
989
- }
990
-
991
- model VendorLink {
992
- id String @id @default(cuid())
993
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
994
- vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
995
- linkId String
996
- vendorId String
997
- }
998
-
999
- model ServiceLink {
1000
- id String @id @default(cuid())
1001
- serviceId String
1002
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1003
- linkId String
1004
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1005
-
1006
- @@index([serviceId])
1007
- }
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
+ media Media[]
818
+ serviceTypes ServiceType[]
819
+ subServiceTypes SubServiceType[]
820
+ serviceTag ServiceTag[]
821
+ customServiceTag String[]
822
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
823
+ serviceLinks ServiceLink[]
824
+ description String?
825
+ canContact Boolean?
826
+ musicGenre MusicGenreType?
827
+ visibility VisibilityPreference @default(Public)
828
+ bashesInterestedIn BashEventType[]
829
+ crowdSizeId String @unique
830
+ crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
831
+ serviceRangeId String @unique
832
+ serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
833
+ availableDateTimes String[] /// Stored in format: ["startDateTime,endDateTime",...]
834
+ serviceTargetAudience ServiceTargetAudience[]
835
+ status ServiceStatus @default(Draft)
836
+ venues Venue[]
837
+
838
+ @@index([email])
839
+ @@index([phone])
840
+ }
841
+
842
+ model Venue {
843
+ id String @id @default(cuid())
844
+ service Service? @relation(fields: [serviceId], references: [id])
845
+ serviceId String?
846
+ venueName String
847
+ capacity Int?
848
+ amenities String[]
849
+ additionalInfo String?
850
+ features String[]
851
+ venueTypes String[]
852
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
853
+ // specialDateTimes Availability[] @relation("SpecialDateTimes")
854
+ mission String?
855
+ pitch String?
856
+ communityInvolvement String?
857
+ emergencyContact String?
858
+ contactDetails String?
859
+ rates String?
860
+ cancellationPolicy String?
861
+ refundPolicy String?
862
+ safetyPolicy String?
863
+ }
864
+
865
+ enum ServiceTag {
866
+ Italian
867
+ }
868
+
869
+ enum SubServiceType {
870
+ Catering
871
+ DJing
872
+ LiveBand
873
+ Photography
874
+ Videography
875
+ }
876
+
877
+ enum YearsOfExperience {
878
+ LessThanOneYear
879
+ OneToThreeYears
880
+ ThreeToFiveYears
881
+ FivePlusYears
882
+ }
883
+
884
+ model ServiceRange {
885
+ id String @id @default(cuid())
886
+ min Int @default(0)
887
+ max Int @default(50)
888
+ serviceCrowdSize Service? @relation("CrowdSize")
889
+ serviceServiceRange Service? @relation("ServiceRange")
890
+ }
891
+
892
+ model Availability {
893
+ id String @id @default(cuid())
894
+ startDateTime String
895
+ endDateTime String
896
+ venueId String?
897
+ venueAvailableDateTimes Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
898
+ // venueSpecialDateTimes Venue? @relation("SpecialDateTimes", fields: [venueId], references: [id])
899
+ }
900
+
901
+ enum VisibilityPreference {
902
+ Public
903
+ Private
904
+ }
905
+
906
+ enum MusicGenreType {
907
+ Classical
908
+ Rock
909
+ HipHop
910
+ Country
911
+ Pop
912
+ EDM
913
+ Indie
914
+ Acoustic
915
+ }
916
+
917
+ enum ServiceType {
918
+ EventService
919
+ EntertainmentService
920
+ Volunteer
921
+ PartnerService
922
+ Venue
923
+ Vendor
924
+ Exhibitor
925
+ Sponsor
926
+ Organization
927
+ }
928
+
929
+ enum UserRole {
930
+ User
931
+ Vendor
932
+ Sponsor
933
+ Investor
934
+ LoanProvider
935
+ VenueProvider
936
+ ServiceProvider
937
+ SuperAdmin
938
+ Exhibitor
939
+ }
940
+
941
+ model UserLink {
942
+ id String @id @default(cuid())
943
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
944
+ linkId String
945
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
946
+ userId String
947
+ }
948
+
949
+ model UserRating {
950
+ id String @id @default(cuid())
951
+ rating Int
952
+ comment String?
953
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
954
+ userRatingGivenId String
955
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
956
+ userId String
957
+ }
958
+
959
+ model UserRatingGiven {
960
+ id String @id @default(cuid())
961
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
962
+ userId String
963
+ UserRating UserRating[]
964
+ }
965
+
966
+ enum UserStatus {
967
+ Active
968
+ Inactive
969
+ Suspended
970
+ Deactivated
971
+ }
972
+
973
+ model VerificationToken {
974
+ identifier String
975
+ token String @unique
976
+ expires DateTime
977
+
978
+ @@unique([identifier, token])
979
+ }
980
+
981
+ model Vendor {
982
+ id String @id @default(cuid())
983
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
984
+ ownerId String
985
+ type String
986
+ amount Float?
987
+ paidOn String?
988
+ links VendorLink[]
989
+ }
990
+
991
+ model VendorLink {
992
+ id String @id @default(cuid())
993
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
994
+ vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
995
+ linkId String
996
+ vendorId String
997
+ }
998
+
999
+ model ServiceLink {
1000
+ id String @id @default(cuid())
1001
+ serviceId String
1002
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1003
+ linkId String
1004
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1005
+
1006
+ @@index([serviceId])
1007
+ }