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