@bash-app/bash-common 1.9.1 → 1.9.2

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