@bash-app/bash-common 4.0.0 → 4.1.0

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