@bash-app/bash-common 1.0.10 → 1.0.11

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,880 +1,880 @@
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
- genre GenreType?
783
- }
784
-
785
- enum GenreType {
786
- Classical
787
- Rock
788
- HipHop
789
- Country
790
- Pop
791
- EDM
792
- Indie
793
- Acoustic
794
- }
795
-
796
- enum ServiceType {
797
- EventService
798
- EntertainmentService
799
- Volunteer
800
- PartnerService
801
- Venue
802
- }
803
-
804
- enum UserRole {
805
- User
806
- Vendor
807
- Sponsor
808
- Investor
809
- LoanProvider
810
- VenueProvider
811
- ServiceProvider
812
- SuperAdmin
813
- Exhibitor
814
- }
815
-
816
- model UserLink {
817
- id String @id @default(cuid())
818
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
819
- linkId String
820
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
821
- userId String
822
- }
823
-
824
- model UserRating {
825
- id String @id @default(cuid())
826
- rating Int
827
- comment String?
828
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
829
- userRatingGivenId String
830
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
831
- userId String
832
- }
833
-
834
- model UserRatingGiven {
835
- id String @id @default(cuid())
836
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
837
- userId String
838
- UserRating UserRating[]
839
- }
840
-
841
- enum UserStatus {
842
- Active
843
- Inactive
844
- Suspended
845
- Deactivated
846
- }
847
-
848
- model VerificationToken {
849
- identifier String
850
- token String @unique
851
- expires DateTime
852
-
853
- @@unique([identifier, token])
854
- }
855
-
856
- model Vendor {
857
- id String @id @default(cuid())
858
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
859
- ownerId String
860
- type String
861
- amount Float?
862
- paidOn String?
863
- links VendorLink[]
864
- }
865
-
866
- model VendorLink {
867
- id String @id @default(cuid())
868
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
869
- vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
870
- linkId String
871
- vendorId String
872
- }
873
-
874
- model ServiceLink {
875
- id String @id @default(cuid())
876
- service Service @relation(fields: [servicesId], references: [id], onDelete: Cascade)
877
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
878
- servicesId String
879
- linkId String
880
- }
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
+ genre GenreType?
783
+ }
784
+
785
+ enum GenreType {
786
+ Classical
787
+ Rock
788
+ HipHop
789
+ Country
790
+ Pop
791
+ EDM
792
+ Indie
793
+ Acoustic
794
+ }
795
+
796
+ enum ServiceType {
797
+ EventService
798
+ EntertainmentService
799
+ Volunteer
800
+ PartnerService
801
+ Venue
802
+ }
803
+
804
+ enum UserRole {
805
+ User
806
+ Vendor
807
+ Sponsor
808
+ Investor
809
+ LoanProvider
810
+ VenueProvider
811
+ ServiceProvider
812
+ SuperAdmin
813
+ Exhibitor
814
+ }
815
+
816
+ model UserLink {
817
+ id String @id @default(cuid())
818
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
819
+ linkId String
820
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
821
+ userId String
822
+ }
823
+
824
+ model UserRating {
825
+ id String @id @default(cuid())
826
+ rating Int
827
+ comment String?
828
+ givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
829
+ userRatingGivenId String
830
+ givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
831
+ userId String
832
+ }
833
+
834
+ model UserRatingGiven {
835
+ id String @id @default(cuid())
836
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
837
+ userId String
838
+ UserRating UserRating[]
839
+ }
840
+
841
+ enum UserStatus {
842
+ Active
843
+ Inactive
844
+ Suspended
845
+ Deactivated
846
+ }
847
+
848
+ model VerificationToken {
849
+ identifier String
850
+ token String @unique
851
+ expires DateTime
852
+
853
+ @@unique([identifier, token])
854
+ }
855
+
856
+ model Vendor {
857
+ id String @id @default(cuid())
858
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
859
+ ownerId String
860
+ type String
861
+ amount Float?
862
+ paidOn String?
863
+ links VendorLink[]
864
+ }
865
+
866
+ model VendorLink {
867
+ id String @id @default(cuid())
868
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
869
+ vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
870
+ linkId String
871
+ vendorId String
872
+ }
873
+
874
+ model ServiceLink {
875
+ id String @id @default(cuid())
876
+ service Service @relation(fields: [servicesId], references: [id], onDelete: Cascade)
877
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
878
+ servicesId String
879
+ linkId String
880
+ }