@bash-app/bash-common 17.8.2 → 17.8.3

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,1036 +1,1033 @@
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 BashTargetAudience?
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
- venueId String? @unique
491
- venue Venue? @relation(fields: [venueId], references: [id])
492
- minimum Int? @default(10)
493
- ideal Int? @default(35)
494
- showMinimumGuests Boolean @default(true)
495
- showIdealGuests Boolean @default(true)
496
- }
497
-
498
- enum Privacy {
499
- Public
500
- ConnectionsOnly
501
- InviteOnly
502
- }
503
-
504
- model BashTargetAudience {
505
- id String @id @default(cuid())
506
- bashEventId String @unique
507
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
508
- ageRange AgeRange @default(NoPreference)
509
- gender Gender @default(NoPreference)
510
- occupation Occupation @default(NoPreference)
511
- education Education @default(NoPreference)
512
- showOnDetailPage Boolean @default(true)
513
- }
514
-
515
- model ServiceTargetAudience {
516
- id String @id @default(cuid())
517
- serviceId String @unique
518
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
519
- ageRange AgeRange @default(NoPreference)
520
- gender Gender @default(NoPreference)
521
- occupation Occupation @default(NoPreference)
522
- education Education @default(NoPreference)
523
- showOnDetailPage Boolean @default(true)
524
- }
525
-
526
- model VenueTargetAudience {
527
- id String @id @default(cuid())
528
- venueId String @unique
529
- venue Venue @relation(fields: [venueId], references: [id], onDelete: Cascade)
530
- ageRange AgeRange @default(NoPreference)
531
- gender Gender @default(NoPreference)
532
- occupation Occupation @default(NoPreference)
533
- education Education @default(NoPreference)
534
- showOnDetailPage Boolean @default(true)
535
- }
536
-
537
- enum AgeRange {
538
- Eighteen_24
539
- TwentyFive_34
540
- ThirtyFive_49
541
- FiftyPlus
542
- NoPreference
543
- }
544
-
545
- enum Occupation {
546
- Student
547
- Startups
548
- SMBs
549
- Corporations
550
- Professional
551
- AngelInvestors
552
- FamilyOffice
553
- Retired
554
- NoPreference
555
- }
556
-
557
- enum Education {
558
- HighSchool
559
- InCollege
560
- Bachelors
561
- Masters
562
- Doctorate
563
- NoPreference
564
- }
565
-
566
- enum BashStatus {
567
- Draft
568
- PreSale
569
- Published
570
- }
571
-
572
- enum ServiceStatus {
573
- Draft
574
- Created
575
- }
576
-
577
- model DocumentID {
578
- id String @id @default(cuid())
579
- givenName String?
580
- familyName String?
581
- middleName String?
582
- suffix String?
583
- streetAddress String?
584
- city String?
585
- state String?
586
- stateName String?
587
- postalCode String?
588
- idNumber String?
589
- expires String?
590
- dob String?
591
- issueDate String?
592
- idType String?
593
- userId String? @unique
594
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
595
- }
596
-
597
- model EventLink {
598
- id String @id @default(cuid())
599
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
600
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
601
- linkId String
602
- bashEventId String
603
- }
604
-
605
- enum Gender {
606
- Male
607
- Female
608
- Other
609
- NoPreference
610
- }
611
-
612
- model Investment {
613
- id String @id @default(cuid())
614
- investorId String
615
- bashEventId String
616
- investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
617
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
618
- amount Float
619
- type InvestmentType
620
- paidOn String?
621
- }
622
-
623
- enum InvestmentType {
624
- Equity
625
- Event
626
- }
627
-
628
- model Link {
629
- id String @id @default(cuid())
630
- url String
631
- type String?
632
- icon String?
633
- vendorLinks VendorLink[]
634
- eventLinks EventLink[]
635
- userLinks UserLink[]
636
- serviceLinks ServiceLink[]
637
- }
638
-
639
- model Media {
640
- id String @id @default(cuid())
641
- url String @unique
642
- type MediaType
643
- mimetype String?
644
- bashEventsReferencingMe BashEvent[]
645
- businessesReferencingMe Business[]
646
- sponsoredEventsReferencingMe SponsoredEvent[]
647
- servicesReferencingMe Service[]
648
- venueReferencingMe Venue[]
649
- }
650
-
651
- enum MediaType {
652
- Unknown
653
- Empty
654
- Image
655
- Video
656
- }
657
-
658
- model Prize {
659
- id String @id @default(cuid())
660
- prizeWorth Float?
661
- prizeType PrizeType
662
- name String
663
- prizeLevel Int
664
- description String
665
- competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
666
- competitionId String?
667
- paidOn String?
668
- winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
669
- winnerUserId String?
670
- }
671
-
672
- enum PrizeType {
673
- Monetary
674
- Merchandise
675
- Service
676
- Combo
677
- }
678
-
679
- model Review {
680
- id String @id @default(cuid())
681
- rating Int
682
- creatorId String
683
- creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
684
- bashEventId String
685
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
686
- comments BashComment[]
687
- }
688
-
689
- model Session {
690
- id String @id @default(cuid())
691
- sessionToken String @unique
692
- userId String
693
- expires DateTime
694
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
695
-
696
- @@index([userId])
697
- }
698
-
699
- enum Sex {
700
- Male
701
- Female
702
- Other
703
- }
704
-
705
- model SponsoredEvent {
706
- id String @id @default(cuid())
707
- amount Float?
708
- paidOn String?
709
- sponsorType SponsorType
710
- sponsorId String
711
- bashEventId String
712
- sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
713
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
714
- media Media[]
715
- }
716
-
717
- enum SponsorType {
718
- Marketing
719
- Giveaway
720
- Awareness
721
- Trade
722
- CompetitionPrizeProvider
723
- }
724
-
725
- model User {
726
- id String @id @default(cuid())
727
- email String @unique
728
- createdOn DateTime @default(now())
729
- stripeCustomerId String? @unique
730
- stripeAccountId String? @unique
731
- googleCalendarAccess String?
732
- givenName String?
733
- familyName String?
734
- hash String?
735
- emailVerified DateTime?
736
- image String?
737
- uploadedImage String?
738
- dob DateTime?
739
- gender Gender?
740
- sex Sex?
741
- roles UserRole[] @default([User])
742
- services Service[]
743
- createdEvents BashEvent[] @relation("CreatedEvent")
744
- ticketsISent Ticket[] @relation("TicketsISent")
745
- ticketsIOwn Ticket[] @relation("TicketsIOwn")
746
- reviews Review[]
747
- sponsorships SponsoredEvent[]
748
- investments Investment[]
749
- sessions Session[]
750
- eventTasks EventTask[]
751
- vendors Vendor[]
752
- clubMembers ClubMember[]
753
- clubAdmins ClubAdmin[]
754
- links UserLink[]
755
- status UserStatus
756
- competitions Competition[]
757
- competitionSponsorships CompetitionSponsor[]
758
- competitionPrizes Prize[]
759
- userRatingGiven UserRatingGiven[]
760
- userRating UserRating[]
761
- magicLink String?
762
- magicLinkExpiration DateTime?
763
- magicLinkUsed DateTime?
764
- idVerified DateTime?
765
- streetAddress String?
766
- city String?
767
- state String?
768
- postalCode String?
769
- country String? @default("US")
770
- phone String?
771
- documentIDId String? @unique
772
- documentID DocumentID?
773
- comment BashComment[]
774
- associatedBashes AssociatedBash[]
775
- invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
776
- invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
777
- notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
778
- remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
779
- remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
780
- eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
781
- checkouts Checkout[]
782
- ticketTiersWaitListsIveJoined TicketTier[]
783
- contacts Contact[]
784
- bashEventPromoCodesIUsed BashEventPromoCode[]
785
- }
786
-
787
- model Contact {
788
- id String @id @default(cuid())
789
- contactOwnerId String
790
- contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
791
- contactEmail String?
792
- fullName String?
793
- phone String?
794
- requestToConnectSent DateTime?
795
- requestToConnectAccepted DateTime?
796
-
797
- @@unique([contactOwnerId, contactEmail])
798
- @@index([contactEmail])
799
- }
800
-
801
- model AssociatedBash {
802
- id String @id @default(cuid())
803
- bashEventId String
804
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
805
- invitationId String? @unique
806
- invitation Invitation? @relation(fields: [invitationId], references: [id])
807
- ownerEmail String?
808
- ownerUserId String?
809
- owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
810
- isOrganizer Boolean?
811
- isFavorite Boolean?
812
-
813
- @@unique([ownerEmail, bashEventId])
814
- }
815
-
816
- model Service {
817
- id String @id @default(cuid())
818
- ownerId String
819
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
820
- email String
821
- streetAddress String
822
- city String
823
- state String
824
- postalCode String
825
- country String
826
- phone String
827
- title String
828
- coverPhoto String?
829
- agreedToAgreement Boolean?
830
- media Media[]
831
- serviceTypes ServiceType[]
832
- subServiceTypes SubServiceType[]
833
- serviceTag ServiceTag[]
834
- customServiceTag String[]
835
- yearsOfExperince YearsOfExperience @default(LessThanOneYear)
836
- serviceLinks ServiceLink[]
837
- description String?
838
- canContact Boolean?
839
- // musicGenre MusicGenreType?
840
- visibility VisibilityPreference @default(Public)
841
- // bashesInterestedIn BashEventType[]
842
- status ServiceStatus @default(Draft)
843
- venues Venue[]
844
- serviceRangeId String @unique
845
- serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
846
- targetAudience ServiceTargetAudience?
847
-
848
- @@index([email])
849
- @@index([phone])
850
- }
851
-
852
- model Venue {
853
- id String @id @default(cuid())
854
- service Service? @relation(fields: [serviceId], references: [id])
855
- serviceId String?
856
- venueName String
857
- email String
858
- streetAddress String
859
- city String
860
- state String
861
- postalCode String
862
- country String
863
- phone String
864
- coverPhoto String?
865
- media Media[]
866
- visibility VisibilityPreference @default(Public)
867
- yearsInBusiness YearsOfExperience
868
- description String?
869
- capacity AmountOfGuests?
870
- amenities String[]
871
- additionalInfo String?
872
- features String[]
873
- venueTypes String[]
874
- availableDateTimes Availability[] @relation("AvailableDateTimes")
875
- // specialDateTimes Availability[] @relation("SpecialDateTimes")
876
- mission String?
877
- pitch String?
878
- communityInvolvement String?
879
- emergencyContact String?
880
- contactDetails String?
881
- rates String?
882
- cancellationPolicy String?
883
- refundPolicy String?
884
- safetyPolicy String?
885
- crowdSizeId String? @unique
886
- crowdSize ServiceRange? @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
887
- targetAudience VenueTargetAudience?
888
- bashesInterestedIn BashEventType[]
889
- venueLinks ServiceLink[]
890
- }
891
-
892
- enum ServiceTag {
893
- Italian
894
- }
895
-
896
- enum SubServiceType {
897
- Catering
898
- DJing
899
- LiveBand
900
- Photography
901
- Videography
902
- }
903
-
904
- enum YearsOfExperience {
905
- LessThanOneYear
906
- OneToThreeYears
907
- ThreeToFiveYears
908
- FivePlusYears
909
- }
910
-
911
- model ServiceRange {
912
- id String @id @default(cuid())
913
- min Int @default(0)
914
- max Int @default(50)
915
- serviceCrowdSize Venue? @relation("CrowdSize")
916
- serviceServiceRange Service? @relation("ServiceRange")
917
- }
918
-
919
- model Availability {
920
- id String @id @default(cuid())
921
- startDateTime String
922
- endDateTime String
923
- venueId String?
924
- venueAvailableDateTimes Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
925
- // venueSpecialDateTimes Venue? @relation("SpecialDateTimes", fields: [venueId], references: [id])
926
- }
927
-
928
- enum VisibilityPreference {
929
- Public
930
- Private
931
- }
932
-
933
- enum MusicGenreType {
934
- Classical
935
- Rock
936
- HipHop
937
- Country
938
- Pop
939
- EDM
940
- Indie
941
- Acoustic
942
- }
943
-
944
- enum ServiceType {
945
- EventService
946
- EntertainmentService
947
- Volunteer
948
- PartnerService
949
- Venue
950
- Vendor
951
- Exhibitor
952
- Sponsor
953
- Organization
954
- }
955
-
956
- enum UserRole {
957
- User
958
- Vendor
959
- Sponsor
960
- Investor
961
- LoanProvider
962
- VenueProvider
963
- ServiceProvider
964
- SuperAdmin
965
- Exhibitor
966
- }
967
-
968
- model UserLink {
969
- id String @id @default(cuid())
970
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
971
- linkId String
972
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
973
- userId String
974
- }
975
-
976
- model UserRating {
977
- id String @id @default(cuid())
978
- rating Int
979
- comment String?
980
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
981
- userRatingGivenId String
982
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
983
- userId String
984
- }
985
-
986
- model UserRatingGiven {
987
- id String @id @default(cuid())
988
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
989
- userId String
990
- UserRating UserRating[]
991
- }
992
-
993
- enum UserStatus {
994
- Active
995
- Inactive
996
- Suspended
997
- Deactivated
998
- }
999
-
1000
- model VerificationToken {
1001
- identifier String
1002
- token String @unique
1003
- expires DateTime
1004
-
1005
- @@unique([identifier, token])
1006
- }
1007
-
1008
- model Vendor {
1009
- id String @id @default(cuid())
1010
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1011
- ownerId String
1012
- type String
1013
- amount Float?
1014
- paidOn String?
1015
- links VendorLink[]
1016
- }
1017
-
1018
- model VendorLink {
1019
- id String @id @default(cuid())
1020
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1021
- vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
1022
- linkId String
1023
- vendorId String
1024
- }
1025
-
1026
- model ServiceLink {
1027
- id String @id @default(cuid())
1028
- serviceId String
1029
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1030
- linkId String
1031
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1032
- venue Venue? @relation(fields: [venueId], references: [id])
1033
- venueId String?
1034
-
1035
- @@index([serviceId])
1036
- }
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 BashTargetAudience?
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
+ venueId String? @unique
491
+ venue Venue? @relation(fields: [venueId], references: [id])
492
+ minimum Int? @default(10)
493
+ ideal Int? @default(35)
494
+ showMinimumGuests Boolean @default(true)
495
+ showIdealGuests Boolean @default(true)
496
+ }
497
+
498
+ enum Privacy {
499
+ Public
500
+ ConnectionsOnly
501
+ InviteOnly
502
+ }
503
+
504
+ model BashTargetAudience {
505
+ id String @id @default(cuid())
506
+ bashEventId String @unique
507
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
508
+ ageRange AgeRange @default(NoPreference)
509
+ gender Gender @default(NoPreference)
510
+ occupation Occupation @default(NoPreference)
511
+ education Education @default(NoPreference)
512
+ showOnDetailPage Boolean @default(true)
513
+ }
514
+
515
+ model ServiceTargetAudience {
516
+ id String @id @default(cuid())
517
+ serviceId String @unique
518
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
519
+ ageRange AgeRange @default(NoPreference)
520
+ gender Gender @default(NoPreference)
521
+ occupation Occupation @default(NoPreference)
522
+ education Education @default(NoPreference)
523
+ showOnDetailPage Boolean @default(true)
524
+ }
525
+
526
+ model VenueTargetAudience {
527
+ id String @id @default(cuid())
528
+ venueId String @unique
529
+ venue Venue @relation(fields: [venueId], references: [id], onDelete: Cascade)
530
+ ageRange AgeRange @default(NoPreference)
531
+ gender Gender @default(NoPreference)
532
+ occupation Occupation @default(NoPreference)
533
+ education Education @default(NoPreference)
534
+ showOnDetailPage Boolean @default(true)
535
+ }
536
+
537
+ enum AgeRange {
538
+ Eighteen_24
539
+ TwentyFive_34
540
+ ThirtyFive_49
541
+ FiftyPlus
542
+ NoPreference
543
+ }
544
+
545
+ enum Occupation {
546
+ Student
547
+ Startups
548
+ SMBs
549
+ Corporations
550
+ Professional
551
+ AngelInvestors
552
+ FamilyOffice
553
+ Retired
554
+ NoPreference
555
+ }
556
+
557
+ enum Education {
558
+ HighSchool
559
+ InCollege
560
+ Bachelors
561
+ Masters
562
+ Doctorate
563
+ NoPreference
564
+ }
565
+
566
+ enum BashStatus {
567
+ Draft
568
+ PreSale
569
+ Published
570
+ }
571
+
572
+ enum ServiceStatus {
573
+ Draft
574
+ Created
575
+ }
576
+
577
+ model DocumentID {
578
+ id String @id @default(cuid())
579
+ givenName String?
580
+ familyName String?
581
+ middleName String?
582
+ suffix String?
583
+ streetAddress String?
584
+ city String?
585
+ state String?
586
+ stateName String?
587
+ postalCode String?
588
+ idNumber String?
589
+ expires String?
590
+ dob String?
591
+ issueDate String?
592
+ idType String?
593
+ userId String? @unique
594
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
595
+ }
596
+
597
+ model EventLink {
598
+ id String @id @default(cuid())
599
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
600
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
601
+ linkId String
602
+ bashEventId String
603
+ }
604
+
605
+ enum Gender {
606
+ Male
607
+ Female
608
+ Other
609
+ NoPreference
610
+ }
611
+
612
+ model Investment {
613
+ id String @id @default(cuid())
614
+ investorId String
615
+ bashEventId String
616
+ investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
617
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
618
+ amount Float
619
+ type InvestmentType
620
+ paidOn String?
621
+ }
622
+
623
+ enum InvestmentType {
624
+ Equity
625
+ Event
626
+ }
627
+
628
+ model Link {
629
+ id String @id @default(cuid())
630
+ url String
631
+ type String?
632
+ icon String?
633
+ vendorLinks VendorLink[]
634
+ eventLinks EventLink[]
635
+ userLinks UserLink[]
636
+ serviceLinks ServiceLink[]
637
+ }
638
+
639
+ model Media {
640
+ id String @id @default(cuid())
641
+ url String @unique
642
+ type MediaType
643
+ mimetype String?
644
+ bashEventsReferencingMe BashEvent[]
645
+ businessesReferencingMe Business[]
646
+ sponsoredEventsReferencingMe SponsoredEvent[]
647
+ servicesReferencingMe Service[]
648
+ venueReferencingMe Venue[]
649
+ }
650
+
651
+ enum MediaType {
652
+ Unknown
653
+ Empty
654
+ Image
655
+ Video
656
+ }
657
+
658
+ model Prize {
659
+ id String @id @default(cuid())
660
+ prizeWorth Float?
661
+ prizeType PrizeType
662
+ name String
663
+ prizeLevel Int
664
+ description String
665
+ competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
666
+ competitionId String?
667
+ paidOn String?
668
+ winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
669
+ winnerUserId String?
670
+ }
671
+
672
+ enum PrizeType {
673
+ Monetary
674
+ Merchandise
675
+ Service
676
+ Combo
677
+ }
678
+
679
+ model Review {
680
+ id String @id @default(cuid())
681
+ rating Int
682
+ creatorId String
683
+ creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
684
+ bashEventId String
685
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
686
+ comments BashComment[]
687
+ }
688
+
689
+ model Session {
690
+ id String @id @default(cuid())
691
+ sessionToken String @unique
692
+ userId String
693
+ expires DateTime
694
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
695
+
696
+ @@index([userId])
697
+ }
698
+
699
+ enum Sex {
700
+ Male
701
+ Female
702
+ Other
703
+ }
704
+
705
+ model SponsoredEvent {
706
+ id String @id @default(cuid())
707
+ amount Float?
708
+ paidOn String?
709
+ sponsorType SponsorType
710
+ sponsorId String
711
+ bashEventId String
712
+ sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
713
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
714
+ media Media[]
715
+ }
716
+
717
+ enum SponsorType {
718
+ Marketing
719
+ Giveaway
720
+ Awareness
721
+ Trade
722
+ CompetitionPrizeProvider
723
+ }
724
+
725
+ model User {
726
+ id String @id @default(cuid())
727
+ email String @unique
728
+ createdOn DateTime @default(now())
729
+ stripeCustomerId String? @unique
730
+ stripeAccountId String? @unique
731
+ googleCalendarAccess String?
732
+ givenName String?
733
+ familyName String?
734
+ hash String?
735
+ emailVerified DateTime?
736
+ image String?
737
+ uploadedImage String?
738
+ dob DateTime?
739
+ gender Gender?
740
+ sex Sex?
741
+ roles UserRole[] @default([User])
742
+ services Service[]
743
+ createdEvents BashEvent[] @relation("CreatedEvent")
744
+ ticketsISent Ticket[] @relation("TicketsISent")
745
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
746
+ reviews Review[]
747
+ sponsorships SponsoredEvent[]
748
+ investments Investment[]
749
+ sessions Session[]
750
+ eventTasks EventTask[]
751
+ vendors Vendor[]
752
+ clubMembers ClubMember[]
753
+ clubAdmins ClubAdmin[]
754
+ links UserLink[]
755
+ status UserStatus
756
+ competitions Competition[]
757
+ competitionSponsorships CompetitionSponsor[]
758
+ competitionPrizes Prize[]
759
+ userRatingGiven UserRatingGiven[]
760
+ userRating UserRating[]
761
+ magicLink String?
762
+ magicLinkExpiration DateTime?
763
+ magicLinkUsed DateTime?
764
+ idVerified DateTime?
765
+ streetAddress String?
766
+ city String?
767
+ state String?
768
+ postalCode String?
769
+ country String? @default("US")
770
+ phone String?
771
+ documentIDId String? @unique
772
+ documentID DocumentID?
773
+ comment BashComment[]
774
+ associatedBashes AssociatedBash[]
775
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
776
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
777
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
778
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
779
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
780
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
781
+ checkouts Checkout[]
782
+ ticketTiersWaitListsIveJoined TicketTier[]
783
+ contacts Contact[]
784
+ bashEventPromoCodesIUsed BashEventPromoCode[]
785
+ }
786
+
787
+ model Contact {
788
+ id String @id @default(cuid())
789
+ contactOwnerId String
790
+ contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
791
+ contactEmail String?
792
+ fullName String?
793
+ phone String?
794
+ requestToConnectSent DateTime?
795
+ requestToConnectAccepted DateTime?
796
+
797
+ @@unique([contactOwnerId, contactEmail])
798
+ @@index([contactEmail])
799
+ }
800
+
801
+ model AssociatedBash {
802
+ id String @id @default(cuid())
803
+ bashEventId String
804
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
805
+ invitationId String? @unique
806
+ invitation Invitation? @relation(fields: [invitationId], references: [id])
807
+ ownerEmail String?
808
+ ownerUserId String?
809
+ owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
810
+ isOrganizer Boolean?
811
+ isFavorite Boolean?
812
+
813
+ @@unique([ownerEmail, bashEventId])
814
+ }
815
+
816
+ model Service {
817
+ id String @id @default(cuid())
818
+ ownerId String
819
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
820
+ email String
821
+ streetAddress String
822
+ city String
823
+ state String
824
+ postalCode String
825
+ country String
826
+ phone String
827
+ title String
828
+ coverPhoto String?
829
+ agreedToAgreement Boolean?
830
+ media Media[]
831
+ serviceTypes ServiceType[]
832
+ subServiceTypes SubServiceType[]
833
+ serviceTag ServiceTag[]
834
+ customServiceTag String[]
835
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
836
+ serviceLinks ServiceLink[]
837
+ description String?
838
+ canContact Boolean?
839
+ // musicGenre MusicGenreType?
840
+ visibility VisibilityPreference @default(Public)
841
+ // bashesInterestedIn BashEventType[]
842
+ status ServiceStatus @default(Draft)
843
+ venues Venue[]
844
+ serviceRangeId String @unique
845
+ serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
846
+ targetAudience ServiceTargetAudience?
847
+
848
+ @@index([email])
849
+ @@index([phone])
850
+ }
851
+
852
+ model Venue {
853
+ id String @id @default(cuid())
854
+ service Service? @relation(fields: [serviceId], references: [id])
855
+ serviceId String?
856
+ venueName String
857
+ email String
858
+ streetAddress String
859
+ city String
860
+ state String
861
+ postalCode String
862
+ country String
863
+ phone String
864
+ coverPhoto String?
865
+ media Media[]
866
+ visibility VisibilityPreference @default(Public)
867
+ yearsInBusiness YearsOfExperience
868
+ description String?
869
+ capacity AmountOfGuests?
870
+ amenities String[]
871
+ additionalInfo String?
872
+ features String[]
873
+ venueTypes String[]
874
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
875
+ // specialDateTimes Availability[] @relation("SpecialDateTimes")
876
+ mission String?
877
+ pitch String?
878
+ communityInvolvement String?
879
+ emergencyContact String?
880
+ contactDetails String?
881
+ rates String?
882
+ cancellationPolicy String?
883
+ refundPolicy String?
884
+ safetyPolicy String?
885
+ targetAudience VenueTargetAudience?
886
+ bashesInterestedIn BashEventType[]
887
+ venueLinks ServiceLink[]
888
+ }
889
+
890
+ enum ServiceTag {
891
+ Italian
892
+ }
893
+
894
+ enum SubServiceType {
895
+ Catering
896
+ DJing
897
+ LiveBand
898
+ Photography
899
+ Videography
900
+ }
901
+
902
+ enum YearsOfExperience {
903
+ LessThanOneYear
904
+ OneToThreeYears
905
+ ThreeToFiveYears
906
+ FivePlusYears
907
+ }
908
+
909
+ model ServiceRange {
910
+ id String @id @default(cuid())
911
+ min Int @default(0)
912
+ max Int @default(50)
913
+ serviceServiceRange Service? @relation("ServiceRange")
914
+ }
915
+
916
+ model Availability {
917
+ id String @id @default(cuid())
918
+ startDateTime String
919
+ endDateTime String
920
+ venueId String?
921
+ venueAvailableDateTimes Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
922
+ // venueSpecialDateTimes Venue? @relation("SpecialDateTimes", fields: [venueId], references: [id])
923
+ }
924
+
925
+ enum VisibilityPreference {
926
+ Public
927
+ Private
928
+ }
929
+
930
+ enum MusicGenreType {
931
+ Classical
932
+ Rock
933
+ HipHop
934
+ Country
935
+ Pop
936
+ EDM
937
+ Indie
938
+ Acoustic
939
+ }
940
+
941
+ enum ServiceType {
942
+ EventService
943
+ EntertainmentService
944
+ Volunteer
945
+ PartnerService
946
+ Venue
947
+ Vendor
948
+ Exhibitor
949
+ Sponsor
950
+ Organization
951
+ }
952
+
953
+ enum UserRole {
954
+ User
955
+ Vendor
956
+ Sponsor
957
+ Investor
958
+ LoanProvider
959
+ VenueProvider
960
+ ServiceProvider
961
+ SuperAdmin
962
+ Exhibitor
963
+ }
964
+
965
+ model UserLink {
966
+ id String @id @default(cuid())
967
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
968
+ linkId String
969
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
970
+ userId String
971
+ }
972
+
973
+ model UserRating {
974
+ id String @id @default(cuid())
975
+ rating Int
976
+ comment String?
977
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
978
+ userRatingGivenId String
979
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
980
+ userId String
981
+ }
982
+
983
+ model UserRatingGiven {
984
+ id String @id @default(cuid())
985
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
986
+ userId String
987
+ UserRating UserRating[]
988
+ }
989
+
990
+ enum UserStatus {
991
+ Active
992
+ Inactive
993
+ Suspended
994
+ Deactivated
995
+ }
996
+
997
+ model VerificationToken {
998
+ identifier String
999
+ token String @unique
1000
+ expires DateTime
1001
+
1002
+ @@unique([identifier, token])
1003
+ }
1004
+
1005
+ model Vendor {
1006
+ id String @id @default(cuid())
1007
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1008
+ ownerId String
1009
+ type String
1010
+ amount Float?
1011
+ paidOn String?
1012
+ links VendorLink[]
1013
+ }
1014
+
1015
+ model VendorLink {
1016
+ id String @id @default(cuid())
1017
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1018
+ vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
1019
+ linkId String
1020
+ vendorId String
1021
+ }
1022
+
1023
+ model ServiceLink {
1024
+ id String @id @default(cuid())
1025
+ serviceId String
1026
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1027
+ linkId String
1028
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1029
+ venue Venue? @relation(fields: [venueId], references: [id])
1030
+ venueId String?
1031
+
1032
+ @@index([serviceId])
1033
+ }