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