@bash-app/bash-common 29.45.0 → 29.48.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.
- package/README.md +8 -8
- package/package.json +47 -47
- package/prisma/schema.prisma +1628 -1623
- package/src/definitions.ts +610 -610
- package/src/extendedSchemas.ts +554 -554
- package/src/index.ts +16 -16
- package/src/utils/addressUtils.ts +173 -173
- package/src/utils/apiUtils.ts +76 -76
- package/src/utils/awsS3Utils.ts +99 -99
- package/src/utils/dateTimeUtils.ts +234 -234
- package/src/utils/paymentUtils.ts +56 -56
- package/src/utils/promoCodesUtils.ts +29 -29
- package/src/utils/qrCodeUtils.ts +23 -23
- package/src/utils/recurrenceUtils.ts +175 -175
- package/src/utils/service/serviceUtils.ts +121 -121
- package/src/utils/service/venueUtils.ts +45 -45
- package/src/utils/sortUtils.ts +28 -28
- package/src/utils/stripeAccountUtils.ts +11 -11
- package/src/utils/ticketListUtils.ts +78 -78
- package/src/utils/urlUtils.ts +29 -29
- package/tsconfig.json +19 -19
package/prisma/schema.prisma
CHANGED
|
@@ -1,1623 +1,1628 @@
|
|
|
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 Club {
|
|
15
|
-
id String @id @default(cuid())
|
|
16
|
-
name String
|
|
17
|
-
street String
|
|
18
|
-
userId String
|
|
19
|
-
price Int?
|
|
20
|
-
events BashEvent[]
|
|
21
|
-
members ClubMember[]
|
|
22
|
-
admin ClubAdmin[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
model ClubAdmin {
|
|
26
|
-
id String @id @default(cuid())
|
|
27
|
-
admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
28
|
-
userId String
|
|
29
|
-
club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
|
|
30
|
-
clubId String
|
|
31
|
-
role ClubAdminRole
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
model ClubMember {
|
|
35
|
-
id String @id @default(cuid())
|
|
36
|
-
member User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
37
|
-
userId String
|
|
38
|
-
club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
|
|
39
|
-
clubId String
|
|
40
|
-
status ClubMemberStatus
|
|
41
|
-
statusHistory Json
|
|
42
|
-
price Int?
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
enum ClubAdminRole {
|
|
46
|
-
Owner
|
|
47
|
-
Admin
|
|
48
|
-
Staff
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
enum ClubMemberStatus {
|
|
52
|
-
Active
|
|
53
|
-
Inactive
|
|
54
|
-
Canceled
|
|
55
|
-
Paused
|
|
56
|
-
Removed
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
model BashComment {
|
|
60
|
-
id String @id @default(cuid())
|
|
61
|
-
creatorId String
|
|
62
|
-
creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
|
|
63
|
-
content String
|
|
64
|
-
reviewId String?
|
|
65
|
-
review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
|
|
66
|
-
bashEventId String?
|
|
67
|
-
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
68
|
-
parentCommentId String?
|
|
69
|
-
parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
|
|
70
|
-
replies BashComment[] @relation("CommentReplies")
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
model Competition {
|
|
74
|
-
id String @id @default(cuid())
|
|
75
|
-
name String
|
|
76
|
-
description String
|
|
77
|
-
owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
78
|
-
prizes Prize[]
|
|
79
|
-
userId String
|
|
80
|
-
sponser CompetitionSponsor[]
|
|
81
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
82
|
-
bashEventId String
|
|
83
|
-
numberOfPrizes Int
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
model CompetitionSponsor {
|
|
87
|
-
id String @id @default(cuid())
|
|
88
|
-
competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
|
|
89
|
-
sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
90
|
-
competitionId String
|
|
91
|
-
userId String
|
|
92
|
-
description String
|
|
93
|
-
paidOn String?
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
model EventTask {
|
|
97
|
-
id String @id @default(cuid())
|
|
98
|
-
creatorId String
|
|
99
|
-
creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
|
|
100
|
-
bashEventId String
|
|
101
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
102
|
-
description String
|
|
103
|
-
assignedToId String?
|
|
104
|
-
assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
|
|
105
|
-
status TaskStatus?
|
|
106
|
-
bashNotificationsReferencingMe BashNotification[]
|
|
107
|
-
createdAt DateTime? @default(now())
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
enum TaskStatus {
|
|
111
|
-
Accepted
|
|
112
|
-
Rejected
|
|
113
|
-
Completed
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
model Reminder {
|
|
117
|
-
id String @id @default(cuid())
|
|
118
|
-
creatorId String
|
|
119
|
-
creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
120
|
-
remindWhoId String?
|
|
121
|
-
remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
|
|
122
|
-
remindDateTime DateTime
|
|
123
|
-
notificationId String
|
|
124
|
-
notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
model BashEventPromoCode {
|
|
128
|
-
id String @id @default(cuid())
|
|
129
|
-
code String
|
|
130
|
-
ticketTierId String
|
|
131
|
-
ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
|
|
132
|
-
stripeCouponId String?
|
|
133
|
-
discountAmountInCents Int?
|
|
134
|
-
discountAmountPercentage Int?
|
|
135
|
-
maxRedemptions Int?
|
|
136
|
-
redeemBy DateTime?
|
|
137
|
-
usedBy User[]
|
|
138
|
-
|
|
139
|
-
@@unique([ticketTierId, code])
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
model BashNotification {
|
|
143
|
-
id String @id @default(cuid())
|
|
144
|
-
creatorId String
|
|
145
|
-
creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
146
|
-
email String
|
|
147
|
-
createdDateTime DateTime @default(now())
|
|
148
|
-
message String
|
|
149
|
-
image String?
|
|
150
|
-
readDateTime DateTime?
|
|
151
|
-
taskId String?
|
|
152
|
-
eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
|
153
|
-
invitationId String?
|
|
154
|
-
invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
|
|
155
|
-
bashEventId String?
|
|
156
|
-
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
157
|
-
reminders Reminder[]
|
|
158
|
-
redirectUrl String?
|
|
159
|
-
|
|
160
|
-
@@unique([creatorId, email, bashEventId])
|
|
161
|
-
@@unique([creatorId, email, invitationId])
|
|
162
|
-
@@index([creatorId])
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
model Invitation {
|
|
166
|
-
id String @id @default(cuid())
|
|
167
|
-
creatorId String
|
|
168
|
-
creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
169
|
-
email String
|
|
170
|
-
sentToId String?
|
|
171
|
-
sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
|
|
172
|
-
bashEventId String?
|
|
173
|
-
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
174
|
-
image String?
|
|
175
|
-
phone String?
|
|
176
|
-
name String?
|
|
177
|
-
message String?
|
|
178
|
-
inviteDate DateTime? @default(now())
|
|
179
|
-
acceptedDate DateTime?
|
|
180
|
-
rejectedDate DateTime?
|
|
181
|
-
maybeDate DateTime?
|
|
182
|
-
tickets Ticket[] @relation("TicketsForInvitation")
|
|
183
|
-
bashNotifications BashNotification[]
|
|
184
|
-
associatedBash AssociatedBash?
|
|
185
|
-
|
|
186
|
-
@@index([email])
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
model BashEvent {
|
|
190
|
-
id String @id @default(cuid())
|
|
191
|
-
title String
|
|
192
|
-
creatorId String
|
|
193
|
-
creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
194
|
-
isApproved Boolean?
|
|
195
|
-
description String?
|
|
196
|
-
eventType String @default("Other")
|
|
197
|
-
startDateTime DateTime? @default(now())
|
|
198
|
-
endDateTime DateTime? @default(now())
|
|
199
|
-
ticketTiers TicketTier[]
|
|
200
|
-
targetAudienceId String? @unique
|
|
201
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
|
|
202
|
-
amountOfGuestsId String? @unique
|
|
203
|
-
amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
|
|
204
|
-
recurrence Recurrence?
|
|
205
|
-
vibe String?
|
|
206
|
-
occasion String?
|
|
207
|
-
dress String?
|
|
208
|
-
allowed String?
|
|
209
|
-
notAllowed String?
|
|
210
|
-
nonProfit Boolean?
|
|
211
|
-
nonProfitId String?
|
|
212
|
-
privacy Privacy @default(Public)
|
|
213
|
-
tickets Ticket[]
|
|
214
|
-
reviews Review[]
|
|
215
|
-
sponsorships SponsoredEvent[]
|
|
216
|
-
investments Investment[]
|
|
217
|
-
capacity Int?
|
|
218
|
-
location String?
|
|
219
|
-
status BashStatus @default(Draft)
|
|
220
|
-
tags String[]
|
|
221
|
-
coverPhoto String?
|
|
222
|
-
media Media[]
|
|
223
|
-
club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
|
|
224
|
-
clubId String?
|
|
225
|
-
links EventLink[]
|
|
226
|
-
competitions Competition[]
|
|
227
|
-
invitations Invitation[]
|
|
228
|
-
dateTimePublished DateTime?
|
|
229
|
-
comments BashComment[]
|
|
230
|
-
includedItems String[]
|
|
231
|
-
associatedBashesReferencingMe AssociatedBash[] // maybe rename later to AssociatedWithABash
|
|
232
|
-
associatedServicesReferencingMe Service[] // maybe rename later to AssociatedWithAService
|
|
233
|
-
bashNotificationsReferencingMe BashNotification[]
|
|
234
|
-
checkouts Checkout[]
|
|
235
|
-
eventTasks EventTask[]
|
|
236
|
-
videoLink String?
|
|
237
|
-
subtitle String?
|
|
238
|
-
isFeatured Boolean?
|
|
239
|
-
isTrending Boolean?
|
|
240
|
-
coordinates Coordinates[] // A BashEvent can have multiple sets of coordinates
|
|
241
|
-
// stripeAccount StripeAccount[]
|
|
242
|
-
// rate Rate[]
|
|
243
|
-
venueId String? // Nullable, meaning it's optional
|
|
244
|
-
venue Venue? @relation(fields: [venueId], references: [id])
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
model Coordinates {
|
|
248
|
-
id Int @id @default(autoincrement())
|
|
249
|
-
lat Float?
|
|
250
|
-
lng Float?
|
|
251
|
-
bashEventId String? // Foreign key to BashEvent, now of type String
|
|
252
|
-
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
model Checkout {
|
|
256
|
-
id String @id @default(cuid())
|
|
257
|
-
ownerId String
|
|
258
|
-
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
259
|
-
bashEventId String
|
|
260
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
261
|
-
checkoutDateTime DateTime? @default(now())
|
|
262
|
-
tickets Ticket[]
|
|
263
|
-
stripeCheckoutSessionId String? @unique
|
|
264
|
-
bookings Booking[]
|
|
265
|
-
|
|
266
|
-
@@index(bashEventId)
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
model TicketTier {
|
|
270
|
-
id String @id @default(cuid())
|
|
271
|
-
bashEventId String
|
|
272
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
273
|
-
tickets Ticket[]
|
|
274
|
-
waitList User[]
|
|
275
|
-
price Int @default(0) //stored multipled by 100 to allow for decimals
|
|
276
|
-
title String @default("Free")
|
|
277
|
-
sortOrder Int?
|
|
278
|
-
description String?
|
|
279
|
-
maximumNumberOfTickets Int @default(100)
|
|
280
|
-
maximumTicketCount Int @default(100)
|
|
281
|
-
isDonationTier Boolean?
|
|
282
|
-
hidden Boolean?
|
|
283
|
-
promoCodes BashEventPromoCode[]
|
|
284
|
-
|
|
285
|
-
@@unique([bashEventId, title])
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
model Ticket {
|
|
289
|
-
id String @id @default(cuid())
|
|
290
|
-
ownerId String
|
|
291
|
-
owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
|
|
292
|
-
bashEventId String
|
|
293
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
|
|
294
|
-
ticketTierId String?
|
|
295
|
-
ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
|
|
296
|
-
validDate DateTime?
|
|
297
|
-
forUserId String?
|
|
298
|
-
forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
|
|
299
|
-
fullName String?
|
|
300
|
-
email String?
|
|
301
|
-
paidOn DateTime?
|
|
302
|
-
allowPromiseToPay Boolean?
|
|
303
|
-
status TicketStatus?
|
|
304
|
-
isFreeGuest Boolean?
|
|
305
|
-
geoFenceCheckInUnnecessary Boolean?
|
|
306
|
-
checkedInAt DateTime?
|
|
307
|
-
checkedOutAt DateTime?
|
|
308
|
-
invitationId String?
|
|
309
|
-
invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
|
|
310
|
-
checkoutId String?
|
|
311
|
-
checkout Checkout? @relation(fields: [checkoutId], references: [id])
|
|
312
|
-
ServiceCheckout ServiceCheckout? @relation(fields: [serviceCheckoutId], references: [id])
|
|
313
|
-
serviceCheckoutId String?
|
|
314
|
-
|
|
315
|
-
@@index([bashEventId])
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
enum TicketStatus {
|
|
319
|
-
Cancelled
|
|
320
|
-
Attended
|
|
321
|
-
Missed
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
model ServiceCheckout {
|
|
325
|
-
id String @id @default(cuid())
|
|
326
|
-
ownerId String
|
|
327
|
-
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
328
|
-
checkoutDateTime DateTime? @default(now())
|
|
329
|
-
tickets Ticket[]
|
|
330
|
-
stripeCheckoutSessionId String? @unique
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
model UserSubscription {
|
|
334
|
-
id String @id @default(cuid())
|
|
335
|
-
ownerId String @unique
|
|
336
|
-
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
337
|
-
type UserSubscriptionType
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
enum UserSubscriptionType {
|
|
341
|
-
Free
|
|
342
|
-
Premium
|
|
343
|
-
VIP
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
enum BookingStatus {
|
|
347
|
-
Cancelled
|
|
348
|
-
Completed
|
|
349
|
-
Missed
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
model Booking {
|
|
353
|
-
id String @id @default(cuid())
|
|
354
|
-
serviceId String
|
|
355
|
-
service Service @relation(fields: [serviceId], references: [id])
|
|
356
|
-
validDate DateTime?
|
|
357
|
-
forUserId String?
|
|
358
|
-
forUser User? @relation(fields: [forUserId], references: [id])
|
|
359
|
-
fullName String?
|
|
360
|
-
email String?
|
|
361
|
-
paidOn DateTime?
|
|
362
|
-
requireDeposit Boolean?
|
|
363
|
-
status BookingStatus?
|
|
364
|
-
geoFenceCheckInUnnecessary Boolean?
|
|
365
|
-
checkedInAt DateTime?
|
|
366
|
-
checkedOutAt DateTime?
|
|
367
|
-
checkoutId String?
|
|
368
|
-
checkout Checkout? @relation(fields: [checkoutId], references: [id])
|
|
369
|
-
|
|
370
|
-
@@index([serviceId])
|
|
371
|
-
@@index([forUserId])
|
|
372
|
-
@@index([checkoutId])
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
|
|
376
|
-
id String @id @default(cuid())
|
|
377
|
-
doNotUseVibeEnum BashEventVibeTags @default(Wild)
|
|
378
|
-
doNotUseDressEnum BashEventDressTags @default(Casual)
|
|
379
|
-
doNotUseBashEventType BashEventType @default(Other)
|
|
380
|
-
doNotUseDayOfWeek DayOfWeek @default(Sunday)
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
model Recurrence {
|
|
384
|
-
id String @id @default(cuid())
|
|
385
|
-
interval Int @default(1)
|
|
386
|
-
bashEventId String @unique
|
|
387
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
388
|
-
frequency RecurringFrequency @default(Never)
|
|
389
|
-
ends DateTime @default(now())
|
|
390
|
-
repeatOnDays DayOfWeek[]
|
|
391
|
-
repeatOnDayOfMonth Int?
|
|
392
|
-
repeatYearlyDate DateTime?
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
enum DayOfWeek {
|
|
396
|
-
Sunday
|
|
397
|
-
Monday
|
|
398
|
-
Tuesday
|
|
399
|
-
Wednesday
|
|
400
|
-
Thursday
|
|
401
|
-
Friday
|
|
402
|
-
Saturday
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
enum RecurringFrequency {
|
|
406
|
-
Never
|
|
407
|
-
Daily
|
|
408
|
-
Weekly
|
|
409
|
-
Monthly
|
|
410
|
-
Yearly
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
enum BashEventVibeTags {
|
|
414
|
-
Wild
|
|
415
|
-
Calm
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
enum BashEventDressTags {
|
|
419
|
-
Casual
|
|
420
|
-
BusinessCasual
|
|
421
|
-
Formal
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// enum ServicesTags {
|
|
425
|
-
// Fast
|
|
426
|
-
// Reliable
|
|
427
|
-
// AwardRecipient
|
|
428
|
-
// }
|
|
429
|
-
|
|
430
|
-
enum BashEventType {
|
|
431
|
-
AfterParty
|
|
432
|
-
AnimeAndCosplayFestival
|
|
433
|
-
AnniversaryCelebration
|
|
434
|
-
ArtExhibitOpening
|
|
435
|
-
ArtAndCraftNight
|
|
436
|
-
BBQCookout
|
|
437
|
-
BabyShower
|
|
438
|
-
BachelorOrBacheloretteParty
|
|
439
|
-
BeachParty
|
|
440
|
-
Birthday
|
|
441
|
-
BoatPartyOrCruise
|
|
442
|
-
Bonfire
|
|
443
|
-
BookClubMeeting
|
|
444
|
-
BridalShower
|
|
445
|
-
BrunchGathering
|
|
446
|
-
CarShow
|
|
447
|
-
CarnivalAndFair
|
|
448
|
-
CasinoNight
|
|
449
|
-
CasualMixer
|
|
450
|
-
CharityBall
|
|
451
|
-
CharityFundraiser
|
|
452
|
-
ChristmasParty
|
|
453
|
-
ChurchEvent
|
|
454
|
-
CircusOrCarnivalParty
|
|
455
|
-
CocktailParty
|
|
456
|
-
CollegeParty_FraternityOrSorority
|
|
457
|
-
ComedyShowOrStandUpComedyNight
|
|
458
|
-
ComicConvention
|
|
459
|
-
Competition
|
|
460
|
-
Concert
|
|
461
|
-
CookingCompetition
|
|
462
|
-
CorporateEventOrOfficeParty
|
|
463
|
-
CostumeParty_Theme_Based
|
|
464
|
-
CulturalFestival
|
|
465
|
-
DanceParty
|
|
466
|
-
DesertRave
|
|
467
|
-
DiscoNight
|
|
468
|
-
EasterGathering
|
|
469
|
-
EngagementParty
|
|
470
|
-
ESportsGamingTournament
|
|
471
|
-
ExclusiveLuxuryRetreat
|
|
472
|
-
FantasyThemedParty
|
|
473
|
-
FashionShow
|
|
474
|
-
Fireside
|
|
475
|
-
FitnessFestival
|
|
476
|
-
FlashMob
|
|
477
|
-
Festival
|
|
478
|
-
FestivalFilm
|
|
479
|
-
FestivalFood
|
|
480
|
-
FundraisingEvent
|
|
481
|
-
GalaDinner
|
|
482
|
-
GameNight
|
|
483
|
-
GamingEvent
|
|
484
|
-
GardenParty
|
|
485
|
-
GoingAwayPartyOrFarewell
|
|
486
|
-
GraduationParty
|
|
487
|
-
HalloweenCostumeParty
|
|
488
|
-
HanukkahParty
|
|
489
|
-
HistoricalEraParty
|
|
490
|
-
HolidayParty
|
|
491
|
-
HouseParty
|
|
492
|
-
HousewarmingParty
|
|
493
|
-
KaraokeNight
|
|
494
|
-
KiteFlyingFestival
|
|
495
|
-
LiveBandPerformanceInALocalVenue
|
|
496
|
-
Luau
|
|
497
|
-
MansionParty
|
|
498
|
-
MardiGras
|
|
499
|
-
MasqueradeBall
|
|
500
|
-
MotorcycleRally
|
|
501
|
-
MovieNight
|
|
502
|
-
MoviePremiere
|
|
503
|
-
MusicFestival
|
|
504
|
-
NewYearsEveCelebration
|
|
505
|
-
OpenMicNight
|
|
506
|
-
OutdoorActivity
|
|
507
|
-
OutdoorConcert
|
|
508
|
-
OutdoorMovieNight_WithAProjector
|
|
509
|
-
Parade
|
|
510
|
-
Party
|
|
511
|
-
PoolParty
|
|
512
|
-
Potluck
|
|
513
|
-
PotluckVegan
|
|
514
|
-
PreParty
|
|
515
|
-
ProductLaunch
|
|
516
|
-
ProfessionalNetworkingEvent
|
|
517
|
-
Rave_General
|
|
518
|
-
RetirementCelebration
|
|
519
|
-
Reunion_FamilyOrSchoolOrFriends
|
|
520
|
-
SafariAdventureParty
|
|
521
|
-
SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
|
|
522
|
-
ScienceFictionThemedParty
|
|
523
|
-
SocialClubEvent
|
|
524
|
-
SportsTournament
|
|
525
|
-
SportsWatchParty
|
|
526
|
-
SuperheroThemedParty
|
|
527
|
-
SurfCompetition
|
|
528
|
-
ThanksgivingDinner
|
|
529
|
-
ThemedCostumeParty
|
|
530
|
-
ThemedDinnerParty
|
|
531
|
-
ThemedPubCrawl
|
|
532
|
-
Tournament
|
|
533
|
-
TravelAndTradeShow
|
|
534
|
-
TriviaNight
|
|
535
|
-
ValentinesDayParty
|
|
536
|
-
WeddingReception
|
|
537
|
-
WelcomeHomeParty
|
|
538
|
-
WellnessFestival
|
|
539
|
-
WineTastingEvent
|
|
540
|
-
Other
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
model CustomBashEventType {
|
|
544
|
-
id String @id @default(cuid())
|
|
545
|
-
key String @unique
|
|
546
|
-
displayName String
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
model AmountOfGuests {
|
|
550
|
-
id String @id @default(cuid())
|
|
551
|
-
bashEvent BashEvent?
|
|
552
|
-
exhibitor Exhibitor?
|
|
553
|
-
eventService EventService?
|
|
554
|
-
entertainmentService EntertainmentService?
|
|
555
|
-
vendor Vendor?
|
|
556
|
-
sponsor Sponsor?
|
|
557
|
-
|
|
558
|
-
minimum Int? @default(10)
|
|
559
|
-
ideal Int? @default(35)
|
|
560
|
-
showMinimumGuests Boolean @default(true)
|
|
561
|
-
showIdealGuests Boolean @default(true)
|
|
562
|
-
venueId String?
|
|
563
|
-
organizationId String?
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
enum Privacy {
|
|
567
|
-
Public
|
|
568
|
-
ConnectionsOnly
|
|
569
|
-
InviteOnly
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
model TargetAudience {
|
|
573
|
-
id String @id @default(cuid())
|
|
574
|
-
ageRange AgeRange[]
|
|
575
|
-
secondaryAgeRange AgeRange[]
|
|
576
|
-
gender Gender[]
|
|
577
|
-
secondaryGender Gender[]
|
|
578
|
-
occupation Occupation[]
|
|
579
|
-
secondaryOccupation Occupation[]
|
|
580
|
-
education Education[]
|
|
581
|
-
secondaryEducation Education[]
|
|
582
|
-
showOnDetailPage Boolean @default(true)
|
|
583
|
-
bashEvent BashEvent?
|
|
584
|
-
service Service?
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
enum AgeRange {
|
|
588
|
-
Sixteen_17
|
|
589
|
-
Eighteen_20
|
|
590
|
-
TwentyOne_25
|
|
591
|
-
TwentySix_34
|
|
592
|
-
ThirtyFive_49
|
|
593
|
-
Fifty_64
|
|
594
|
-
SixtyFivePlus
|
|
595
|
-
NoPreference
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
enum Occupation {
|
|
599
|
-
Students
|
|
600
|
-
Entrepreneurs
|
|
601
|
-
SmallBusinesses
|
|
602
|
-
Corporations
|
|
603
|
-
Professionals
|
|
604
|
-
Creatives
|
|
605
|
-
AngelInvestors
|
|
606
|
-
FamilyOffices
|
|
607
|
-
Retirees
|
|
608
|
-
Academics
|
|
609
|
-
Government
|
|
610
|
-
NonProfits
|
|
611
|
-
NoPreference
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
enum Education {
|
|
615
|
-
HighSchool
|
|
616
|
-
SomeCollege
|
|
617
|
-
InCollege
|
|
618
|
-
Bachelors
|
|
619
|
-
GraduateStudent
|
|
620
|
-
Masters
|
|
621
|
-
Doctorate
|
|
622
|
-
NoPreference
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
enum BashStatus {
|
|
626
|
-
Draft
|
|
627
|
-
PreSale
|
|
628
|
-
Published
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
enum ServiceStatus {
|
|
632
|
-
Draft
|
|
633
|
-
Created
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
enum ServiceCondition {
|
|
637
|
-
Pending
|
|
638
|
-
Published
|
|
639
|
-
Suspended
|
|
640
|
-
Deactivated
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
enum VolunteerServiceStatus {
|
|
644
|
-
Draft
|
|
645
|
-
Pending
|
|
646
|
-
Created
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
model DocumentID {
|
|
650
|
-
id String @id @default(cuid())
|
|
651
|
-
givenName String?
|
|
652
|
-
familyName String?
|
|
653
|
-
middleName String?
|
|
654
|
-
suffix String?
|
|
655
|
-
street String?
|
|
656
|
-
city String?
|
|
657
|
-
state String?
|
|
658
|
-
stateName String?
|
|
659
|
-
zipCode String?
|
|
660
|
-
idNumber String?
|
|
661
|
-
expires String?
|
|
662
|
-
dob String?
|
|
663
|
-
issueDate String?
|
|
664
|
-
idType String?
|
|
665
|
-
userId String? @unique
|
|
666
|
-
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
model EventLink {
|
|
670
|
-
id String @id @default(cuid())
|
|
671
|
-
link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
|
|
672
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
673
|
-
linkId String
|
|
674
|
-
bashEventId String
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
enum Gender {
|
|
678
|
-
Male
|
|
679
|
-
Female
|
|
680
|
-
Other
|
|
681
|
-
NoPreference
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
model Investment {
|
|
685
|
-
id String @id @default(cuid())
|
|
686
|
-
investorId String
|
|
687
|
-
bashEventId String
|
|
688
|
-
investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
|
|
689
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
690
|
-
amount Float
|
|
691
|
-
type InvestmentType
|
|
692
|
-
paidOn String?
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
enum InvestmentType {
|
|
696
|
-
Equity
|
|
697
|
-
Event
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
model Link {
|
|
701
|
-
id String @id @default(cuid())
|
|
702
|
-
url String
|
|
703
|
-
type String?
|
|
704
|
-
icon String?
|
|
705
|
-
eventLinks EventLink[]
|
|
706
|
-
userLinks UserLink[]
|
|
707
|
-
serviceLinks ServiceLink[]
|
|
708
|
-
volunteerServiceId String?
|
|
709
|
-
volunteerService VolunteerService? @relation("VolunteerServiceLinks", fields: [volunteerServiceId], references: [id])
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
model Media {
|
|
713
|
-
id String @id @default(cuid())
|
|
714
|
-
url String @unique
|
|
715
|
-
type MediaType
|
|
716
|
-
mimetype String?
|
|
717
|
-
bashEventsReferencingMe BashEvent[]
|
|
718
|
-
sponsoredEventsReferencingMe SponsoredEvent[]
|
|
719
|
-
serviceReferencingMe Service[]
|
|
720
|
-
volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
|
|
721
|
-
volunteerServiceId String?
|
|
722
|
-
|
|
723
|
-
stripeAccount StripeAccount[]
|
|
724
|
-
serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
|
|
725
|
-
serviceRatesAssociationId String?
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
enum MediaType {
|
|
729
|
-
Unknown
|
|
730
|
-
Empty
|
|
731
|
-
Image
|
|
732
|
-
Video
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
model Prize {
|
|
736
|
-
id String @id @default(cuid())
|
|
737
|
-
prizeWorth Float?
|
|
738
|
-
prizeType PrizeType
|
|
739
|
-
name String
|
|
740
|
-
prizeLevel Int
|
|
741
|
-
description String
|
|
742
|
-
competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
|
|
743
|
-
competitionId String?
|
|
744
|
-
paidOn String?
|
|
745
|
-
winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
|
|
746
|
-
winnerUserId String?
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
enum PrizeType {
|
|
750
|
-
Monetary
|
|
751
|
-
Merchandise
|
|
752
|
-
Service
|
|
753
|
-
Combo
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
model Review {
|
|
757
|
-
id String @id @default(cuid())
|
|
758
|
-
rating Int
|
|
759
|
-
creatorId String
|
|
760
|
-
creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
|
|
761
|
-
bashEventId String
|
|
762
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
763
|
-
comments BashComment[]
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
model GoogleReview {
|
|
767
|
-
id String @id @default(cuid())
|
|
768
|
-
author_name String?
|
|
769
|
-
rating Float
|
|
770
|
-
text String?
|
|
771
|
-
createdAt DateTime @default(now())
|
|
772
|
-
serviceId String
|
|
773
|
-
// service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
model Session {
|
|
777
|
-
id String @id @default(cuid())
|
|
778
|
-
sessionToken String @unique
|
|
779
|
-
userId String
|
|
780
|
-
expires DateTime
|
|
781
|
-
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
782
|
-
|
|
783
|
-
@@index([userId])
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
enum Sex {
|
|
787
|
-
Male
|
|
788
|
-
Female
|
|
789
|
-
Other
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
model SponsoredEvent {
|
|
793
|
-
id String @id @default(cuid())
|
|
794
|
-
amount Float?
|
|
795
|
-
paidOn String?
|
|
796
|
-
sponsorType SponsorType
|
|
797
|
-
sponsorId String
|
|
798
|
-
bashEventId String
|
|
799
|
-
sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
|
|
800
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
801
|
-
media Media[]
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
enum SponsorType {
|
|
805
|
-
Marketing
|
|
806
|
-
Giveaway
|
|
807
|
-
Awareness
|
|
808
|
-
Trade
|
|
809
|
-
CompetitionPrizeProvider
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
model SocialMediaProfile {
|
|
813
|
-
id String @id @default(uuid())
|
|
814
|
-
platform SocialMediaPlatform
|
|
815
|
-
url String
|
|
816
|
-
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
817
|
-
userId String
|
|
818
|
-
|
|
819
|
-
@@unique([userId, platform]) // Ensure a user cannot have multiple profiles on the same platform
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
enum SocialMediaPlatform {
|
|
823
|
-
Facebook
|
|
824
|
-
Instagram
|
|
825
|
-
LinkedIn
|
|
826
|
-
TikTok
|
|
827
|
-
X
|
|
828
|
-
YouTube
|
|
829
|
-
Snapchat
|
|
830
|
-
Pinterest
|
|
831
|
-
Reddit
|
|
832
|
-
WhatsApp
|
|
833
|
-
Messenger
|
|
834
|
-
Telegram
|
|
835
|
-
Discord
|
|
836
|
-
Clubhouse
|
|
837
|
-
Twitch
|
|
838
|
-
Medium
|
|
839
|
-
BeReal
|
|
840
|
-
Mastodon
|
|
841
|
-
Tumblr
|
|
842
|
-
Threads
|
|
843
|
-
WeChat
|
|
844
|
-
Vk
|
|
845
|
-
Line
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
model User {
|
|
849
|
-
id String @id @default(cuid())
|
|
850
|
-
email String @unique
|
|
851
|
-
createdOn DateTime @default(now())
|
|
852
|
-
stripeCustomerId String? @unique
|
|
853
|
-
stripeAccountId String? @unique
|
|
854
|
-
isSuperUser Boolean @default(false)
|
|
855
|
-
googleCalendarAccess String?
|
|
856
|
-
givenName String?
|
|
857
|
-
familyName String?
|
|
858
|
-
hash String?
|
|
859
|
-
emailVerified DateTime?
|
|
860
|
-
image String?
|
|
861
|
-
uploadedImage String?
|
|
862
|
-
dob DateTime?
|
|
863
|
-
gender Gender?
|
|
864
|
-
sex Sex?
|
|
865
|
-
roles UserRole[] @default([User])
|
|
866
|
-
ownedServices Service[] @relation("OwnedService")
|
|
867
|
-
createdServices Service[] @relation("CreatedService")
|
|
868
|
-
createdEvents BashEvent[] @relation("CreatedEvent")
|
|
869
|
-
ticketsISent Ticket[] @relation("TicketsISent")
|
|
870
|
-
ticketsIOwn Ticket[] @relation("TicketsIOwn")
|
|
871
|
-
reviews Review[]
|
|
872
|
-
sponsorships SponsoredEvent[]
|
|
873
|
-
investments Investment[]
|
|
874
|
-
sessions Session[]
|
|
875
|
-
eventTasks EventTask[]
|
|
876
|
-
clubMembers ClubMember[]
|
|
877
|
-
clubAdmins ClubAdmin[]
|
|
878
|
-
links UserLink[]
|
|
879
|
-
status UserStatus
|
|
880
|
-
competitions Competition[]
|
|
881
|
-
competitionSponsorships CompetitionSponsor[]
|
|
882
|
-
competitionPrizes Prize[]
|
|
883
|
-
userRatingGiven UserRatingGiven[]
|
|
884
|
-
userRating UserRating[]
|
|
885
|
-
magicLink String?
|
|
886
|
-
magicLinkExpiration DateTime?
|
|
887
|
-
magicLinkUsed DateTime?
|
|
888
|
-
idVerified DateTime?
|
|
889
|
-
street String?
|
|
890
|
-
city String?
|
|
891
|
-
state String?
|
|
892
|
-
zipCode String?
|
|
893
|
-
country String? @default("US")
|
|
894
|
-
phone String?
|
|
895
|
-
socialMediaProfiles SocialMediaProfile[]
|
|
896
|
-
documentIDId String? @unique
|
|
897
|
-
documentID DocumentID?
|
|
898
|
-
comment BashComment[]
|
|
899
|
-
associatedBashes AssociatedBash[]
|
|
900
|
-
associatedServices AssociatedService[]
|
|
901
|
-
invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
|
|
902
|
-
invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
|
|
903
|
-
notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
|
|
904
|
-
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
905
|
-
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
906
|
-
eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
|
|
907
|
-
checkouts Checkout[]
|
|
908
|
-
ticketTiersWaitListsIveJoined TicketTier[]
|
|
909
|
-
contacts Contact[]
|
|
910
|
-
bashEventPromoCodesIUsed BashEventPromoCode[]
|
|
911
|
-
serviceCheckouts ServiceCheckout[]
|
|
912
|
-
bookingForMe Booking[]
|
|
913
|
-
userSubscription UserSubscription?
|
|
914
|
-
serviceSubcriptions ServiceSubscription[]
|
|
915
|
-
volunteerService VolunteerService[]
|
|
916
|
-
stripeAccounts StripeAccount[]
|
|
917
|
-
ServicePromoCodeRedemption ServicePromoCodeRedemption[]
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
model Contact {
|
|
921
|
-
id String @id @default(cuid())
|
|
922
|
-
contactOwnerId String
|
|
923
|
-
contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
|
|
924
|
-
contactEmail String?
|
|
925
|
-
fullName String?
|
|
926
|
-
phone String?
|
|
927
|
-
requestToConnectSent DateTime?
|
|
928
|
-
requestToConnectAccepted DateTime?
|
|
929
|
-
|
|
930
|
-
@@unique([contactOwnerId, contactEmail])
|
|
931
|
-
@@index([contactEmail])
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
// anyone that is invited to the bash, is an organizer of a bash, and or the creator/owner of the bash...for having others (including services) edit or post about a bash in the bashfeed
|
|
935
|
-
model AssociatedBash {
|
|
936
|
-
id String @id @default(cuid())
|
|
937
|
-
bashEventId String
|
|
938
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
939
|
-
invitationId String? @unique
|
|
940
|
-
invitation Invitation? @relation(fields: [invitationId], references: [id])
|
|
941
|
-
ownerEmail String?
|
|
942
|
-
ownerUserId String?
|
|
943
|
-
owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
|
|
944
|
-
isOrganizer Boolean?
|
|
945
|
-
isFavorite Boolean?
|
|
946
|
-
service Service[]
|
|
947
|
-
|
|
948
|
-
@@unique([ownerEmail, bashEventId])
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
// anyone that is invited to be an organizer of a service profile or is the creator/owner...for having others edit or post about a service in the bashfeed (but the service must be associated with a bash to post)
|
|
952
|
-
model AssociatedService {
|
|
953
|
-
id String @id @default(cuid())
|
|
954
|
-
serviceId String
|
|
955
|
-
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
956
|
-
// referralId String? @unique
|
|
957
|
-
// referral Referral? @relation(fields: [referralId], references: [id])
|
|
958
|
-
ownerEmail String?
|
|
959
|
-
ownerUserId String?
|
|
960
|
-
owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
|
|
961
|
-
isOrganizer Boolean?
|
|
962
|
-
isFavorite Boolean?
|
|
963
|
-
|
|
964
|
-
@@unique([ownerEmail, serviceId])
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
enum ServiceCancelationPolicy {
|
|
968
|
-
None
|
|
969
|
-
VeryFlexible
|
|
970
|
-
Flexible
|
|
971
|
-
Standard90Day
|
|
972
|
-
Standard30Day
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
model ServiceSubscription {
|
|
976
|
-
id String @id @default(cuid())
|
|
977
|
-
ownerId String
|
|
978
|
-
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
979
|
-
slots Int @default(0)
|
|
980
|
-
stripeSubscriptionId String?
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
model ServiceListingSubscription {
|
|
984
|
-
id String @id @default(cuid())
|
|
985
|
-
stripeAccountId String
|
|
986
|
-
stripeAccount StripeAccount @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict, onUpdate: Restrict)
|
|
987
|
-
stripeCheckoutSessionId String? @unique
|
|
988
|
-
stripeSubscriptionId String? @unique
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
enum
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
//
|
|
1373
|
-
//
|
|
1374
|
-
//
|
|
1375
|
-
|
|
1376
|
-
//
|
|
1377
|
-
//
|
|
1378
|
-
//
|
|
1379
|
-
//
|
|
1380
|
-
|
|
1381
|
-
//
|
|
1382
|
-
//
|
|
1383
|
-
//
|
|
1384
|
-
//
|
|
1385
|
-
//
|
|
1386
|
-
//
|
|
1387
|
-
//
|
|
1388
|
-
//
|
|
1389
|
-
//
|
|
1390
|
-
//
|
|
1391
|
-
//
|
|
1392
|
-
|
|
1393
|
-
//
|
|
1394
|
-
//
|
|
1395
|
-
//
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
//
|
|
1399
|
-
//
|
|
1400
|
-
//
|
|
1401
|
-
|
|
1402
|
-
//
|
|
1403
|
-
|
|
1404
|
-
//
|
|
1405
|
-
//
|
|
1406
|
-
|
|
1407
|
-
//
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
//
|
|
1411
|
-
|
|
1412
|
-
//
|
|
1413
|
-
//
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
//
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
enum
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
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 Club {
|
|
15
|
+
id String @id @default(cuid())
|
|
16
|
+
name String
|
|
17
|
+
street String
|
|
18
|
+
userId String
|
|
19
|
+
price Int?
|
|
20
|
+
events BashEvent[]
|
|
21
|
+
members ClubMember[]
|
|
22
|
+
admin ClubAdmin[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
model ClubAdmin {
|
|
26
|
+
id String @id @default(cuid())
|
|
27
|
+
admin User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
28
|
+
userId String
|
|
29
|
+
club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
|
|
30
|
+
clubId String
|
|
31
|
+
role ClubAdminRole
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
model ClubMember {
|
|
35
|
+
id String @id @default(cuid())
|
|
36
|
+
member User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
37
|
+
userId String
|
|
38
|
+
club Club @relation(fields: [clubId], references: [id], onDelete: Cascade)
|
|
39
|
+
clubId String
|
|
40
|
+
status ClubMemberStatus
|
|
41
|
+
statusHistory Json
|
|
42
|
+
price Int?
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
enum ClubAdminRole {
|
|
46
|
+
Owner
|
|
47
|
+
Admin
|
|
48
|
+
Staff
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
enum ClubMemberStatus {
|
|
52
|
+
Active
|
|
53
|
+
Inactive
|
|
54
|
+
Canceled
|
|
55
|
+
Paused
|
|
56
|
+
Removed
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
model BashComment {
|
|
60
|
+
id String @id @default(cuid())
|
|
61
|
+
creatorId String
|
|
62
|
+
creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
|
|
63
|
+
content String
|
|
64
|
+
reviewId String?
|
|
65
|
+
review Review? @relation(fields: [reviewId], references: [id], onDelete: SetNull)
|
|
66
|
+
bashEventId String?
|
|
67
|
+
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
68
|
+
parentCommentId String?
|
|
69
|
+
parentComment BashComment? @relation("CommentReplies", fields: [parentCommentId], references: [id], onDelete: Cascade)
|
|
70
|
+
replies BashComment[] @relation("CommentReplies")
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
model Competition {
|
|
74
|
+
id String @id @default(cuid())
|
|
75
|
+
name String
|
|
76
|
+
description String
|
|
77
|
+
owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
78
|
+
prizes Prize[]
|
|
79
|
+
userId String
|
|
80
|
+
sponser CompetitionSponsor[]
|
|
81
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
82
|
+
bashEventId String
|
|
83
|
+
numberOfPrizes Int
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
model CompetitionSponsor {
|
|
87
|
+
id String @id @default(cuid())
|
|
88
|
+
competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
|
|
89
|
+
sponsor User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
90
|
+
competitionId String
|
|
91
|
+
userId String
|
|
92
|
+
description String
|
|
93
|
+
paidOn String?
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
model EventTask {
|
|
97
|
+
id String @id @default(cuid())
|
|
98
|
+
creatorId String
|
|
99
|
+
creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
|
|
100
|
+
bashEventId String
|
|
101
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
102
|
+
description String
|
|
103
|
+
assignedToId String?
|
|
104
|
+
assignedTo User? @relation("TasksAssignedToMe", fields: [assignedToId], references: [id], onDelete: Cascade)
|
|
105
|
+
status TaskStatus?
|
|
106
|
+
bashNotificationsReferencingMe BashNotification[]
|
|
107
|
+
createdAt DateTime? @default(now())
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
enum TaskStatus {
|
|
111
|
+
Accepted
|
|
112
|
+
Rejected
|
|
113
|
+
Completed
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
model Reminder {
|
|
117
|
+
id String @id @default(cuid())
|
|
118
|
+
creatorId String
|
|
119
|
+
creator User @relation("RemindersCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
120
|
+
remindWhoId String?
|
|
121
|
+
remindWho User? @relation("RemindersAssignedToMe", fields: [remindWhoId], references: [id], onDelete: Cascade)
|
|
122
|
+
remindDateTime DateTime
|
|
123
|
+
notificationId String
|
|
124
|
+
notification BashNotification @relation(fields: [notificationId], references: [id], onDelete: Cascade)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
model BashEventPromoCode {
|
|
128
|
+
id String @id @default(cuid())
|
|
129
|
+
code String
|
|
130
|
+
ticketTierId String
|
|
131
|
+
ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
|
|
132
|
+
stripeCouponId String?
|
|
133
|
+
discountAmountInCents Int?
|
|
134
|
+
discountAmountPercentage Int?
|
|
135
|
+
maxRedemptions Int?
|
|
136
|
+
redeemBy DateTime?
|
|
137
|
+
usedBy User[]
|
|
138
|
+
|
|
139
|
+
@@unique([ticketTierId, code])
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
model BashNotification {
|
|
143
|
+
id String @id @default(cuid())
|
|
144
|
+
creatorId String
|
|
145
|
+
creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
146
|
+
email String
|
|
147
|
+
createdDateTime DateTime @default(now())
|
|
148
|
+
message String
|
|
149
|
+
image String?
|
|
150
|
+
readDateTime DateTime?
|
|
151
|
+
taskId String?
|
|
152
|
+
eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
|
153
|
+
invitationId String?
|
|
154
|
+
invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
|
|
155
|
+
bashEventId String?
|
|
156
|
+
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
157
|
+
reminders Reminder[]
|
|
158
|
+
redirectUrl String?
|
|
159
|
+
|
|
160
|
+
@@unique([creatorId, email, bashEventId])
|
|
161
|
+
@@unique([creatorId, email, invitationId])
|
|
162
|
+
@@index([creatorId])
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
model Invitation {
|
|
166
|
+
id String @id @default(cuid())
|
|
167
|
+
creatorId String
|
|
168
|
+
creator User @relation("InvitationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
169
|
+
email String
|
|
170
|
+
sentToId String?
|
|
171
|
+
sentTo User? @relation("InvitationsSentToMe", fields: [sentToId], references: [id], onDelete: Cascade)
|
|
172
|
+
bashEventId String?
|
|
173
|
+
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
174
|
+
image String?
|
|
175
|
+
phone String?
|
|
176
|
+
name String?
|
|
177
|
+
message String?
|
|
178
|
+
inviteDate DateTime? @default(now())
|
|
179
|
+
acceptedDate DateTime?
|
|
180
|
+
rejectedDate DateTime?
|
|
181
|
+
maybeDate DateTime?
|
|
182
|
+
tickets Ticket[] @relation("TicketsForInvitation")
|
|
183
|
+
bashNotifications BashNotification[]
|
|
184
|
+
associatedBash AssociatedBash?
|
|
185
|
+
|
|
186
|
+
@@index([email])
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
model BashEvent {
|
|
190
|
+
id String @id @default(cuid())
|
|
191
|
+
title String
|
|
192
|
+
creatorId String
|
|
193
|
+
creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
194
|
+
isApproved Boolean?
|
|
195
|
+
description String?
|
|
196
|
+
eventType String @default("Other")
|
|
197
|
+
startDateTime DateTime? @default(now())
|
|
198
|
+
endDateTime DateTime? @default(now())
|
|
199
|
+
ticketTiers TicketTier[]
|
|
200
|
+
targetAudienceId String? @unique
|
|
201
|
+
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
|
|
202
|
+
amountOfGuestsId String? @unique
|
|
203
|
+
amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
|
|
204
|
+
recurrence Recurrence?
|
|
205
|
+
vibe String?
|
|
206
|
+
occasion String?
|
|
207
|
+
dress String?
|
|
208
|
+
allowed String?
|
|
209
|
+
notAllowed String?
|
|
210
|
+
nonProfit Boolean?
|
|
211
|
+
nonProfitId String?
|
|
212
|
+
privacy Privacy @default(Public)
|
|
213
|
+
tickets Ticket[]
|
|
214
|
+
reviews Review[]
|
|
215
|
+
sponsorships SponsoredEvent[]
|
|
216
|
+
investments Investment[]
|
|
217
|
+
capacity Int?
|
|
218
|
+
location String?
|
|
219
|
+
status BashStatus @default(Draft)
|
|
220
|
+
tags String[]
|
|
221
|
+
coverPhoto String?
|
|
222
|
+
media Media[]
|
|
223
|
+
club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
|
|
224
|
+
clubId String?
|
|
225
|
+
links EventLink[]
|
|
226
|
+
competitions Competition[]
|
|
227
|
+
invitations Invitation[]
|
|
228
|
+
dateTimePublished DateTime?
|
|
229
|
+
comments BashComment[]
|
|
230
|
+
includedItems String[]
|
|
231
|
+
associatedBashesReferencingMe AssociatedBash[] // maybe rename later to AssociatedWithABash
|
|
232
|
+
associatedServicesReferencingMe Service[] // maybe rename later to AssociatedWithAService
|
|
233
|
+
bashNotificationsReferencingMe BashNotification[]
|
|
234
|
+
checkouts Checkout[]
|
|
235
|
+
eventTasks EventTask[]
|
|
236
|
+
videoLink String?
|
|
237
|
+
subtitle String?
|
|
238
|
+
isFeatured Boolean?
|
|
239
|
+
isTrending Boolean?
|
|
240
|
+
coordinates Coordinates[] // A BashEvent can have multiple sets of coordinates
|
|
241
|
+
// stripeAccount StripeAccount[]
|
|
242
|
+
// rate Rate[]
|
|
243
|
+
venueId String? // Nullable, meaning it's optional
|
|
244
|
+
venue Venue? @relation(fields: [venueId], references: [id])
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
model Coordinates {
|
|
248
|
+
id Int @id @default(autoincrement())
|
|
249
|
+
lat Float?
|
|
250
|
+
lng Float?
|
|
251
|
+
bashEventId String? // Foreign key to BashEvent, now of type String
|
|
252
|
+
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
model Checkout {
|
|
256
|
+
id String @id @default(cuid())
|
|
257
|
+
ownerId String
|
|
258
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
259
|
+
bashEventId String
|
|
260
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
261
|
+
checkoutDateTime DateTime? @default(now())
|
|
262
|
+
tickets Ticket[]
|
|
263
|
+
stripeCheckoutSessionId String? @unique
|
|
264
|
+
bookings Booking[]
|
|
265
|
+
|
|
266
|
+
@@index(bashEventId)
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
model TicketTier {
|
|
270
|
+
id String @id @default(cuid())
|
|
271
|
+
bashEventId String
|
|
272
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
273
|
+
tickets Ticket[]
|
|
274
|
+
waitList User[]
|
|
275
|
+
price Int @default(0) //stored multipled by 100 to allow for decimals
|
|
276
|
+
title String @default("Free")
|
|
277
|
+
sortOrder Int?
|
|
278
|
+
description String?
|
|
279
|
+
maximumNumberOfTickets Int @default(100)
|
|
280
|
+
maximumTicketCount Int @default(100)
|
|
281
|
+
isDonationTier Boolean?
|
|
282
|
+
hidden Boolean?
|
|
283
|
+
promoCodes BashEventPromoCode[]
|
|
284
|
+
|
|
285
|
+
@@unique([bashEventId, title])
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
model Ticket {
|
|
289
|
+
id String @id @default(cuid())
|
|
290
|
+
ownerId String
|
|
291
|
+
owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
|
|
292
|
+
bashEventId String
|
|
293
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
|
|
294
|
+
ticketTierId String?
|
|
295
|
+
ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
|
|
296
|
+
validDate DateTime?
|
|
297
|
+
forUserId String?
|
|
298
|
+
forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
|
|
299
|
+
fullName String?
|
|
300
|
+
email String?
|
|
301
|
+
paidOn DateTime?
|
|
302
|
+
allowPromiseToPay Boolean?
|
|
303
|
+
status TicketStatus?
|
|
304
|
+
isFreeGuest Boolean?
|
|
305
|
+
geoFenceCheckInUnnecessary Boolean?
|
|
306
|
+
checkedInAt DateTime?
|
|
307
|
+
checkedOutAt DateTime?
|
|
308
|
+
invitationId String?
|
|
309
|
+
invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
|
|
310
|
+
checkoutId String?
|
|
311
|
+
checkout Checkout? @relation(fields: [checkoutId], references: [id])
|
|
312
|
+
ServiceCheckout ServiceCheckout? @relation(fields: [serviceCheckoutId], references: [id])
|
|
313
|
+
serviceCheckoutId String?
|
|
314
|
+
|
|
315
|
+
@@index([bashEventId])
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
enum TicketStatus {
|
|
319
|
+
Cancelled
|
|
320
|
+
Attended
|
|
321
|
+
Missed
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
model ServiceCheckout {
|
|
325
|
+
id String @id @default(cuid())
|
|
326
|
+
ownerId String
|
|
327
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
328
|
+
checkoutDateTime DateTime? @default(now())
|
|
329
|
+
tickets Ticket[]
|
|
330
|
+
stripeCheckoutSessionId String? @unique
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
model UserSubscription {
|
|
334
|
+
id String @id @default(cuid())
|
|
335
|
+
ownerId String @unique
|
|
336
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
337
|
+
type UserSubscriptionType
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
enum UserSubscriptionType {
|
|
341
|
+
Free
|
|
342
|
+
Premium
|
|
343
|
+
VIP
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
enum BookingStatus {
|
|
347
|
+
Cancelled
|
|
348
|
+
Completed
|
|
349
|
+
Missed
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
model Booking {
|
|
353
|
+
id String @id @default(cuid())
|
|
354
|
+
serviceId String
|
|
355
|
+
service Service @relation(fields: [serviceId], references: [id])
|
|
356
|
+
validDate DateTime?
|
|
357
|
+
forUserId String?
|
|
358
|
+
forUser User? @relation(fields: [forUserId], references: [id])
|
|
359
|
+
fullName String?
|
|
360
|
+
email String?
|
|
361
|
+
paidOn DateTime?
|
|
362
|
+
requireDeposit Boolean?
|
|
363
|
+
status BookingStatus?
|
|
364
|
+
geoFenceCheckInUnnecessary Boolean?
|
|
365
|
+
checkedInAt DateTime?
|
|
366
|
+
checkedOutAt DateTime?
|
|
367
|
+
checkoutId String?
|
|
368
|
+
checkout Checkout? @relation(fields: [checkoutId], references: [id])
|
|
369
|
+
|
|
370
|
+
@@index([serviceId])
|
|
371
|
+
@@index([forUserId])
|
|
372
|
+
@@index([checkoutId])
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
model unusedModelButNeededForSomeTypesToBeDefinedForTypescript {
|
|
376
|
+
id String @id @default(cuid())
|
|
377
|
+
doNotUseVibeEnum BashEventVibeTags @default(Wild)
|
|
378
|
+
doNotUseDressEnum BashEventDressTags @default(Casual)
|
|
379
|
+
doNotUseBashEventType BashEventType @default(Other)
|
|
380
|
+
doNotUseDayOfWeek DayOfWeek @default(Sunday)
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
model Recurrence {
|
|
384
|
+
id String @id @default(cuid())
|
|
385
|
+
interval Int @default(1)
|
|
386
|
+
bashEventId String @unique
|
|
387
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
388
|
+
frequency RecurringFrequency @default(Never)
|
|
389
|
+
ends DateTime @default(now())
|
|
390
|
+
repeatOnDays DayOfWeek[]
|
|
391
|
+
repeatOnDayOfMonth Int?
|
|
392
|
+
repeatYearlyDate DateTime?
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
enum DayOfWeek {
|
|
396
|
+
Sunday
|
|
397
|
+
Monday
|
|
398
|
+
Tuesday
|
|
399
|
+
Wednesday
|
|
400
|
+
Thursday
|
|
401
|
+
Friday
|
|
402
|
+
Saturday
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
enum RecurringFrequency {
|
|
406
|
+
Never
|
|
407
|
+
Daily
|
|
408
|
+
Weekly
|
|
409
|
+
Monthly
|
|
410
|
+
Yearly
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
enum BashEventVibeTags {
|
|
414
|
+
Wild
|
|
415
|
+
Calm
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
enum BashEventDressTags {
|
|
419
|
+
Casual
|
|
420
|
+
BusinessCasual
|
|
421
|
+
Formal
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// enum ServicesTags {
|
|
425
|
+
// Fast
|
|
426
|
+
// Reliable
|
|
427
|
+
// AwardRecipient
|
|
428
|
+
// }
|
|
429
|
+
|
|
430
|
+
enum BashEventType {
|
|
431
|
+
AfterParty
|
|
432
|
+
AnimeAndCosplayFestival
|
|
433
|
+
AnniversaryCelebration
|
|
434
|
+
ArtExhibitOpening
|
|
435
|
+
ArtAndCraftNight
|
|
436
|
+
BBQCookout
|
|
437
|
+
BabyShower
|
|
438
|
+
BachelorOrBacheloretteParty
|
|
439
|
+
BeachParty
|
|
440
|
+
Birthday
|
|
441
|
+
BoatPartyOrCruise
|
|
442
|
+
Bonfire
|
|
443
|
+
BookClubMeeting
|
|
444
|
+
BridalShower
|
|
445
|
+
BrunchGathering
|
|
446
|
+
CarShow
|
|
447
|
+
CarnivalAndFair
|
|
448
|
+
CasinoNight
|
|
449
|
+
CasualMixer
|
|
450
|
+
CharityBall
|
|
451
|
+
CharityFundraiser
|
|
452
|
+
ChristmasParty
|
|
453
|
+
ChurchEvent
|
|
454
|
+
CircusOrCarnivalParty
|
|
455
|
+
CocktailParty
|
|
456
|
+
CollegeParty_FraternityOrSorority
|
|
457
|
+
ComedyShowOrStandUpComedyNight
|
|
458
|
+
ComicConvention
|
|
459
|
+
Competition
|
|
460
|
+
Concert
|
|
461
|
+
CookingCompetition
|
|
462
|
+
CorporateEventOrOfficeParty
|
|
463
|
+
CostumeParty_Theme_Based
|
|
464
|
+
CulturalFestival
|
|
465
|
+
DanceParty
|
|
466
|
+
DesertRave
|
|
467
|
+
DiscoNight
|
|
468
|
+
EasterGathering
|
|
469
|
+
EngagementParty
|
|
470
|
+
ESportsGamingTournament
|
|
471
|
+
ExclusiveLuxuryRetreat
|
|
472
|
+
FantasyThemedParty
|
|
473
|
+
FashionShow
|
|
474
|
+
Fireside
|
|
475
|
+
FitnessFestival
|
|
476
|
+
FlashMob
|
|
477
|
+
Festival
|
|
478
|
+
FestivalFilm
|
|
479
|
+
FestivalFood
|
|
480
|
+
FundraisingEvent
|
|
481
|
+
GalaDinner
|
|
482
|
+
GameNight
|
|
483
|
+
GamingEvent
|
|
484
|
+
GardenParty
|
|
485
|
+
GoingAwayPartyOrFarewell
|
|
486
|
+
GraduationParty
|
|
487
|
+
HalloweenCostumeParty
|
|
488
|
+
HanukkahParty
|
|
489
|
+
HistoricalEraParty
|
|
490
|
+
HolidayParty
|
|
491
|
+
HouseParty
|
|
492
|
+
HousewarmingParty
|
|
493
|
+
KaraokeNight
|
|
494
|
+
KiteFlyingFestival
|
|
495
|
+
LiveBandPerformanceInALocalVenue
|
|
496
|
+
Luau
|
|
497
|
+
MansionParty
|
|
498
|
+
MardiGras
|
|
499
|
+
MasqueradeBall
|
|
500
|
+
MotorcycleRally
|
|
501
|
+
MovieNight
|
|
502
|
+
MoviePremiere
|
|
503
|
+
MusicFestival
|
|
504
|
+
NewYearsEveCelebration
|
|
505
|
+
OpenMicNight
|
|
506
|
+
OutdoorActivity
|
|
507
|
+
OutdoorConcert
|
|
508
|
+
OutdoorMovieNight_WithAProjector
|
|
509
|
+
Parade
|
|
510
|
+
Party
|
|
511
|
+
PoolParty
|
|
512
|
+
Potluck
|
|
513
|
+
PotluckVegan
|
|
514
|
+
PreParty
|
|
515
|
+
ProductLaunch
|
|
516
|
+
ProfessionalNetworkingEvent
|
|
517
|
+
Rave_General
|
|
518
|
+
RetirementCelebration
|
|
519
|
+
Reunion_FamilyOrSchoolOrFriends
|
|
520
|
+
SafariAdventureParty
|
|
521
|
+
SchoolEvent_MiddleSchoolOrHighSchoolOrCollege
|
|
522
|
+
ScienceFictionThemedParty
|
|
523
|
+
SocialClubEvent
|
|
524
|
+
SportsTournament
|
|
525
|
+
SportsWatchParty
|
|
526
|
+
SuperheroThemedParty
|
|
527
|
+
SurfCompetition
|
|
528
|
+
ThanksgivingDinner
|
|
529
|
+
ThemedCostumeParty
|
|
530
|
+
ThemedDinnerParty
|
|
531
|
+
ThemedPubCrawl
|
|
532
|
+
Tournament
|
|
533
|
+
TravelAndTradeShow
|
|
534
|
+
TriviaNight
|
|
535
|
+
ValentinesDayParty
|
|
536
|
+
WeddingReception
|
|
537
|
+
WelcomeHomeParty
|
|
538
|
+
WellnessFestival
|
|
539
|
+
WineTastingEvent
|
|
540
|
+
Other
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
model CustomBashEventType {
|
|
544
|
+
id String @id @default(cuid())
|
|
545
|
+
key String @unique
|
|
546
|
+
displayName String
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
model AmountOfGuests {
|
|
550
|
+
id String @id @default(cuid())
|
|
551
|
+
bashEvent BashEvent?
|
|
552
|
+
exhibitor Exhibitor?
|
|
553
|
+
eventService EventService?
|
|
554
|
+
entertainmentService EntertainmentService?
|
|
555
|
+
vendor Vendor?
|
|
556
|
+
sponsor Sponsor?
|
|
557
|
+
|
|
558
|
+
minimum Int? @default(10)
|
|
559
|
+
ideal Int? @default(35)
|
|
560
|
+
showMinimumGuests Boolean @default(true)
|
|
561
|
+
showIdealGuests Boolean @default(true)
|
|
562
|
+
venueId String?
|
|
563
|
+
organizationId String?
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
enum Privacy {
|
|
567
|
+
Public
|
|
568
|
+
ConnectionsOnly
|
|
569
|
+
InviteOnly
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
model TargetAudience {
|
|
573
|
+
id String @id @default(cuid())
|
|
574
|
+
ageRange AgeRange[]
|
|
575
|
+
secondaryAgeRange AgeRange[]
|
|
576
|
+
gender Gender[]
|
|
577
|
+
secondaryGender Gender[]
|
|
578
|
+
occupation Occupation[]
|
|
579
|
+
secondaryOccupation Occupation[]
|
|
580
|
+
education Education[]
|
|
581
|
+
secondaryEducation Education[]
|
|
582
|
+
showOnDetailPage Boolean @default(true)
|
|
583
|
+
bashEvent BashEvent?
|
|
584
|
+
service Service?
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
enum AgeRange {
|
|
588
|
+
Sixteen_17
|
|
589
|
+
Eighteen_20
|
|
590
|
+
TwentyOne_25
|
|
591
|
+
TwentySix_34
|
|
592
|
+
ThirtyFive_49
|
|
593
|
+
Fifty_64
|
|
594
|
+
SixtyFivePlus
|
|
595
|
+
NoPreference
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
enum Occupation {
|
|
599
|
+
Students
|
|
600
|
+
Entrepreneurs
|
|
601
|
+
SmallBusinesses
|
|
602
|
+
Corporations
|
|
603
|
+
Professionals
|
|
604
|
+
Creatives
|
|
605
|
+
AngelInvestors
|
|
606
|
+
FamilyOffices
|
|
607
|
+
Retirees
|
|
608
|
+
Academics
|
|
609
|
+
Government
|
|
610
|
+
NonProfits
|
|
611
|
+
NoPreference
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
enum Education {
|
|
615
|
+
HighSchool
|
|
616
|
+
SomeCollege
|
|
617
|
+
InCollege
|
|
618
|
+
Bachelors
|
|
619
|
+
GraduateStudent
|
|
620
|
+
Masters
|
|
621
|
+
Doctorate
|
|
622
|
+
NoPreference
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
enum BashStatus {
|
|
626
|
+
Draft
|
|
627
|
+
PreSale
|
|
628
|
+
Published
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
enum ServiceStatus {
|
|
632
|
+
Draft
|
|
633
|
+
Created
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
enum ServiceCondition {
|
|
637
|
+
Pending
|
|
638
|
+
Published
|
|
639
|
+
Suspended
|
|
640
|
+
Deactivated
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
enum VolunteerServiceStatus {
|
|
644
|
+
Draft
|
|
645
|
+
Pending
|
|
646
|
+
Created
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
model DocumentID {
|
|
650
|
+
id String @id @default(cuid())
|
|
651
|
+
givenName String?
|
|
652
|
+
familyName String?
|
|
653
|
+
middleName String?
|
|
654
|
+
suffix String?
|
|
655
|
+
street String?
|
|
656
|
+
city String?
|
|
657
|
+
state String?
|
|
658
|
+
stateName String?
|
|
659
|
+
zipCode String?
|
|
660
|
+
idNumber String?
|
|
661
|
+
expires String?
|
|
662
|
+
dob String?
|
|
663
|
+
issueDate String?
|
|
664
|
+
idType String?
|
|
665
|
+
userId String? @unique
|
|
666
|
+
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
model EventLink {
|
|
670
|
+
id String @id @default(cuid())
|
|
671
|
+
link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
|
|
672
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
673
|
+
linkId String
|
|
674
|
+
bashEventId String
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
enum Gender {
|
|
678
|
+
Male
|
|
679
|
+
Female
|
|
680
|
+
Other
|
|
681
|
+
NoPreference
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
model Investment {
|
|
685
|
+
id String @id @default(cuid())
|
|
686
|
+
investorId String
|
|
687
|
+
bashEventId String
|
|
688
|
+
investor User @relation(fields: [investorId], references: [id], onDelete: Cascade)
|
|
689
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
690
|
+
amount Float
|
|
691
|
+
type InvestmentType
|
|
692
|
+
paidOn String?
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
enum InvestmentType {
|
|
696
|
+
Equity
|
|
697
|
+
Event
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
model Link {
|
|
701
|
+
id String @id @default(cuid())
|
|
702
|
+
url String
|
|
703
|
+
type String?
|
|
704
|
+
icon String?
|
|
705
|
+
eventLinks EventLink[]
|
|
706
|
+
userLinks UserLink[]
|
|
707
|
+
serviceLinks ServiceLink[]
|
|
708
|
+
volunteerServiceId String?
|
|
709
|
+
volunteerService VolunteerService? @relation("VolunteerServiceLinks", fields: [volunteerServiceId], references: [id])
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
model Media {
|
|
713
|
+
id String @id @default(cuid())
|
|
714
|
+
url String @unique
|
|
715
|
+
type MediaType
|
|
716
|
+
mimetype String?
|
|
717
|
+
bashEventsReferencingMe BashEvent[]
|
|
718
|
+
sponsoredEventsReferencingMe SponsoredEvent[]
|
|
719
|
+
serviceReferencingMe Service[]
|
|
720
|
+
volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
|
|
721
|
+
volunteerServiceId String?
|
|
722
|
+
|
|
723
|
+
stripeAccount StripeAccount[]
|
|
724
|
+
serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
|
|
725
|
+
serviceRatesAssociationId String?
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
enum MediaType {
|
|
729
|
+
Unknown
|
|
730
|
+
Empty
|
|
731
|
+
Image
|
|
732
|
+
Video
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
model Prize {
|
|
736
|
+
id String @id @default(cuid())
|
|
737
|
+
prizeWorth Float?
|
|
738
|
+
prizeType PrizeType
|
|
739
|
+
name String
|
|
740
|
+
prizeLevel Int
|
|
741
|
+
description String
|
|
742
|
+
competition Competition? @relation(fields: [competitionId], references: [id], onDelete: SetNull)
|
|
743
|
+
competitionId String?
|
|
744
|
+
paidOn String?
|
|
745
|
+
winner User? @relation(fields: [winnerUserId], references: [id], onDelete: Cascade)
|
|
746
|
+
winnerUserId String?
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
enum PrizeType {
|
|
750
|
+
Monetary
|
|
751
|
+
Merchandise
|
|
752
|
+
Service
|
|
753
|
+
Combo
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
model Review {
|
|
757
|
+
id String @id @default(cuid())
|
|
758
|
+
rating Int
|
|
759
|
+
creatorId String
|
|
760
|
+
creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
|
|
761
|
+
bashEventId String
|
|
762
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
763
|
+
comments BashComment[]
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
model GoogleReview {
|
|
767
|
+
id String @id @default(cuid())
|
|
768
|
+
author_name String?
|
|
769
|
+
rating Float
|
|
770
|
+
text String?
|
|
771
|
+
createdAt DateTime @default(now())
|
|
772
|
+
serviceId String
|
|
773
|
+
// service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
model Session {
|
|
777
|
+
id String @id @default(cuid())
|
|
778
|
+
sessionToken String @unique
|
|
779
|
+
userId String
|
|
780
|
+
expires DateTime
|
|
781
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
782
|
+
|
|
783
|
+
@@index([userId])
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
enum Sex {
|
|
787
|
+
Male
|
|
788
|
+
Female
|
|
789
|
+
Other
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
model SponsoredEvent {
|
|
793
|
+
id String @id @default(cuid())
|
|
794
|
+
amount Float?
|
|
795
|
+
paidOn String?
|
|
796
|
+
sponsorType SponsorType
|
|
797
|
+
sponsorId String
|
|
798
|
+
bashEventId String
|
|
799
|
+
sponsor User @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
|
|
800
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
801
|
+
media Media[]
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
enum SponsorType {
|
|
805
|
+
Marketing
|
|
806
|
+
Giveaway
|
|
807
|
+
Awareness
|
|
808
|
+
Trade
|
|
809
|
+
CompetitionPrizeProvider
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
model SocialMediaProfile {
|
|
813
|
+
id String @id @default(uuid())
|
|
814
|
+
platform SocialMediaPlatform
|
|
815
|
+
url String
|
|
816
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
817
|
+
userId String
|
|
818
|
+
|
|
819
|
+
@@unique([userId, platform]) // Ensure a user cannot have multiple profiles on the same platform
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
enum SocialMediaPlatform {
|
|
823
|
+
Facebook
|
|
824
|
+
Instagram
|
|
825
|
+
LinkedIn
|
|
826
|
+
TikTok
|
|
827
|
+
X
|
|
828
|
+
YouTube
|
|
829
|
+
Snapchat
|
|
830
|
+
Pinterest
|
|
831
|
+
Reddit
|
|
832
|
+
WhatsApp
|
|
833
|
+
Messenger
|
|
834
|
+
Telegram
|
|
835
|
+
Discord
|
|
836
|
+
Clubhouse
|
|
837
|
+
Twitch
|
|
838
|
+
Medium
|
|
839
|
+
BeReal
|
|
840
|
+
Mastodon
|
|
841
|
+
Tumblr
|
|
842
|
+
Threads
|
|
843
|
+
WeChat
|
|
844
|
+
Vk
|
|
845
|
+
Line
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
model User {
|
|
849
|
+
id String @id @default(cuid())
|
|
850
|
+
email String @unique
|
|
851
|
+
createdOn DateTime @default(now())
|
|
852
|
+
stripeCustomerId String? @unique
|
|
853
|
+
stripeAccountId String? @unique
|
|
854
|
+
isSuperUser Boolean @default(false)
|
|
855
|
+
googleCalendarAccess String?
|
|
856
|
+
givenName String?
|
|
857
|
+
familyName String?
|
|
858
|
+
hash String?
|
|
859
|
+
emailVerified DateTime?
|
|
860
|
+
image String?
|
|
861
|
+
uploadedImage String?
|
|
862
|
+
dob DateTime?
|
|
863
|
+
gender Gender?
|
|
864
|
+
sex Sex?
|
|
865
|
+
roles UserRole[] @default([User])
|
|
866
|
+
ownedServices Service[] @relation("OwnedService")
|
|
867
|
+
createdServices Service[] @relation("CreatedService")
|
|
868
|
+
createdEvents BashEvent[] @relation("CreatedEvent")
|
|
869
|
+
ticketsISent Ticket[] @relation("TicketsISent")
|
|
870
|
+
ticketsIOwn Ticket[] @relation("TicketsIOwn")
|
|
871
|
+
reviews Review[]
|
|
872
|
+
sponsorships SponsoredEvent[]
|
|
873
|
+
investments Investment[]
|
|
874
|
+
sessions Session[]
|
|
875
|
+
eventTasks EventTask[]
|
|
876
|
+
clubMembers ClubMember[]
|
|
877
|
+
clubAdmins ClubAdmin[]
|
|
878
|
+
links UserLink[]
|
|
879
|
+
status UserStatus
|
|
880
|
+
competitions Competition[]
|
|
881
|
+
competitionSponsorships CompetitionSponsor[]
|
|
882
|
+
competitionPrizes Prize[]
|
|
883
|
+
userRatingGiven UserRatingGiven[]
|
|
884
|
+
userRating UserRating[]
|
|
885
|
+
magicLink String?
|
|
886
|
+
magicLinkExpiration DateTime?
|
|
887
|
+
magicLinkUsed DateTime?
|
|
888
|
+
idVerified DateTime?
|
|
889
|
+
street String?
|
|
890
|
+
city String?
|
|
891
|
+
state String?
|
|
892
|
+
zipCode String?
|
|
893
|
+
country String? @default("US")
|
|
894
|
+
phone String?
|
|
895
|
+
socialMediaProfiles SocialMediaProfile[]
|
|
896
|
+
documentIDId String? @unique
|
|
897
|
+
documentID DocumentID?
|
|
898
|
+
comment BashComment[]
|
|
899
|
+
associatedBashes AssociatedBash[]
|
|
900
|
+
associatedServices AssociatedService[]
|
|
901
|
+
invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
|
|
902
|
+
invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
|
|
903
|
+
notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
|
|
904
|
+
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
905
|
+
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
906
|
+
eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
|
|
907
|
+
checkouts Checkout[]
|
|
908
|
+
ticketTiersWaitListsIveJoined TicketTier[]
|
|
909
|
+
contacts Contact[]
|
|
910
|
+
bashEventPromoCodesIUsed BashEventPromoCode[]
|
|
911
|
+
serviceCheckouts ServiceCheckout[]
|
|
912
|
+
bookingForMe Booking[]
|
|
913
|
+
userSubscription UserSubscription?
|
|
914
|
+
serviceSubcriptions ServiceSubscription[]
|
|
915
|
+
volunteerService VolunteerService[]
|
|
916
|
+
stripeAccounts StripeAccount[]
|
|
917
|
+
ServicePromoCodeRedemption ServicePromoCodeRedemption[]
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
model Contact {
|
|
921
|
+
id String @id @default(cuid())
|
|
922
|
+
contactOwnerId String
|
|
923
|
+
contactOwner User @relation(fields: [contactOwnerId], references: [id], onDelete: Cascade)
|
|
924
|
+
contactEmail String?
|
|
925
|
+
fullName String?
|
|
926
|
+
phone String?
|
|
927
|
+
requestToConnectSent DateTime?
|
|
928
|
+
requestToConnectAccepted DateTime?
|
|
929
|
+
|
|
930
|
+
@@unique([contactOwnerId, contactEmail])
|
|
931
|
+
@@index([contactEmail])
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
// anyone that is invited to the bash, is an organizer of a bash, and or the creator/owner of the bash...for having others (including services) edit or post about a bash in the bashfeed
|
|
935
|
+
model AssociatedBash {
|
|
936
|
+
id String @id @default(cuid())
|
|
937
|
+
bashEventId String
|
|
938
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
939
|
+
invitationId String? @unique
|
|
940
|
+
invitation Invitation? @relation(fields: [invitationId], references: [id])
|
|
941
|
+
ownerEmail String?
|
|
942
|
+
ownerUserId String?
|
|
943
|
+
owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
|
|
944
|
+
isOrganizer Boolean?
|
|
945
|
+
isFavorite Boolean?
|
|
946
|
+
service Service[]
|
|
947
|
+
|
|
948
|
+
@@unique([ownerEmail, bashEventId])
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// anyone that is invited to be an organizer of a service profile or is the creator/owner...for having others edit or post about a service in the bashfeed (but the service must be associated with a bash to post)
|
|
952
|
+
model AssociatedService {
|
|
953
|
+
id String @id @default(cuid())
|
|
954
|
+
serviceId String
|
|
955
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
956
|
+
// referralId String? @unique
|
|
957
|
+
// referral Referral? @relation(fields: [referralId], references: [id])
|
|
958
|
+
ownerEmail String?
|
|
959
|
+
ownerUserId String?
|
|
960
|
+
owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
|
|
961
|
+
isOrganizer Boolean?
|
|
962
|
+
isFavorite Boolean?
|
|
963
|
+
|
|
964
|
+
@@unique([ownerEmail, serviceId])
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
enum ServiceCancelationPolicy {
|
|
968
|
+
None
|
|
969
|
+
VeryFlexible
|
|
970
|
+
Flexible
|
|
971
|
+
Standard90Day
|
|
972
|
+
Standard30Day
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
model ServiceSubscription {
|
|
976
|
+
id String @id @default(cuid())
|
|
977
|
+
ownerId String
|
|
978
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
979
|
+
slots Int @default(0)
|
|
980
|
+
stripeSubscriptionId String?
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
model ServiceListingSubscription {
|
|
984
|
+
id String @id @default(cuid())
|
|
985
|
+
stripeAccountId String
|
|
986
|
+
stripeAccount StripeAccount @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict, onUpdate: Restrict)
|
|
987
|
+
stripeCheckoutSessionId String? @unique
|
|
988
|
+
stripeSubscriptionId String? @unique
|
|
989
|
+
|
|
990
|
+
// lastCheckoutSessionCreatedAt DateTime
|
|
991
|
+
// checkoutInProgress Boolean @default(false)
|
|
992
|
+
|
|
993
|
+
subscriptionStatus ServiceSubscriptionStatus @default(None)
|
|
994
|
+
|
|
995
|
+
serviceId String @unique
|
|
996
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Restrict)
|
|
997
|
+
|
|
998
|
+
@@index([stripeCheckoutSessionId, stripeSubscriptionId])
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
// Common data for all services; 1-1 relation between each individual service model such as Venue
|
|
1002
|
+
model Service {
|
|
1003
|
+
id String @id @default(cuid())
|
|
1004
|
+
|
|
1005
|
+
serviceType ServiceTypes?
|
|
1006
|
+
serviceStatus ServiceStatus @default(Draft)
|
|
1007
|
+
serviceCondition ServiceCondition @default(Pending)
|
|
1008
|
+
|
|
1009
|
+
isApproved Boolean @default(false)
|
|
1010
|
+
|
|
1011
|
+
// current owner
|
|
1012
|
+
ownerId String?
|
|
1013
|
+
owner User? @relation("OwnedService", fields: [ownerId], references: [id])
|
|
1014
|
+
|
|
1015
|
+
// original creator
|
|
1016
|
+
creatorId String?
|
|
1017
|
+
creator User? @relation("CreatedService", fields: [creatorId], references: [id])
|
|
1018
|
+
|
|
1019
|
+
createdAt DateTime @default(now())
|
|
1020
|
+
updatedAt DateTime? @updatedAt
|
|
1021
|
+
|
|
1022
|
+
associatedBashesReferencingMe AssociatedBash[]
|
|
1023
|
+
associatedServicesReferencingMe AssociatedService[]
|
|
1024
|
+
|
|
1025
|
+
serviceName String?
|
|
1026
|
+
tagline String?
|
|
1027
|
+
|
|
1028
|
+
// this is not the business info but that which is associated with the service
|
|
1029
|
+
place String?
|
|
1030
|
+
googlePlaceId String?
|
|
1031
|
+
street String?
|
|
1032
|
+
city String?
|
|
1033
|
+
state String?
|
|
1034
|
+
zipCode String?
|
|
1035
|
+
country String?
|
|
1036
|
+
description String?
|
|
1037
|
+
// email String?
|
|
1038
|
+
// phone String?
|
|
1039
|
+
|
|
1040
|
+
pocName String?
|
|
1041
|
+
pocPhoneNumber String?
|
|
1042
|
+
pocBusinessEmail String?
|
|
1043
|
+
|
|
1044
|
+
additionalInfo String?
|
|
1045
|
+
coverPhoto String?
|
|
1046
|
+
|
|
1047
|
+
mission String?
|
|
1048
|
+
communityInvolvement String?
|
|
1049
|
+
emergencyContact String?
|
|
1050
|
+
contactDetails String?
|
|
1051
|
+
// rates Rate[] @relation("MultipleRates")
|
|
1052
|
+
cancellationPolicy ServiceCancelationPolicy? @default(None)
|
|
1053
|
+
// refundPolicy String?
|
|
1054
|
+
// insurancePolicy String?
|
|
1055
|
+
// hoursOfOperation Json? @default("{}")
|
|
1056
|
+
|
|
1057
|
+
displayGoogleReviewsOnDetailPage Boolean @default(true)
|
|
1058
|
+
displayBashReviewsOnDetailPage Boolean @default(true)
|
|
1059
|
+
|
|
1060
|
+
stripeAccountId String?
|
|
1061
|
+
stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict)
|
|
1062
|
+
|
|
1063
|
+
serviceListingSubscription ServiceListingSubscription?
|
|
1064
|
+
|
|
1065
|
+
targetAudienceId String? @unique
|
|
1066
|
+
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
|
|
1067
|
+
|
|
1068
|
+
visibility VisibilityPreference @default(Public)
|
|
1069
|
+
|
|
1070
|
+
bashesNotInterestedIn BashEventType[]
|
|
1071
|
+
bookings Booking[]
|
|
1072
|
+
media Media[]
|
|
1073
|
+
serviceLinks ServiceLink[]
|
|
1074
|
+
|
|
1075
|
+
volunteerServiceId String?
|
|
1076
|
+
volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
|
|
1077
|
+
eventService EventService?
|
|
1078
|
+
entertainmentService EntertainmentService?
|
|
1079
|
+
vendor Vendor?
|
|
1080
|
+
exhibitor Exhibitor?
|
|
1081
|
+
sponsor Sponsor?
|
|
1082
|
+
venue Venue?
|
|
1083
|
+
organization Organization?
|
|
1084
|
+
|
|
1085
|
+
serviceRatesAssociation ServiceRatesAssociation?
|
|
1086
|
+
|
|
1087
|
+
// googleReviews GoogleReview[]
|
|
1088
|
+
|
|
1089
|
+
bashEvent BashEvent[] // because a service needs to be associated with a bash to post to the bashfeed
|
|
1090
|
+
servicePromoCodeRedemption ServicePromoCodeRedemption[]
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
model StripeAccount {
|
|
1094
|
+
id String @id @default(cuid())
|
|
1095
|
+
|
|
1096
|
+
ownerId String
|
|
1097
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict)
|
|
1098
|
+
|
|
1099
|
+
stripeAccountId String @unique
|
|
1100
|
+
stripeCustomerId String? @unique
|
|
1101
|
+
|
|
1102
|
+
logoId String?
|
|
1103
|
+
logo Media? @relation(fields: [logoId], references: [id], onDelete: SetNull)
|
|
1104
|
+
|
|
1105
|
+
createdAt DateTime @default(now())
|
|
1106
|
+
updatedAt DateTime @updatedAt
|
|
1107
|
+
|
|
1108
|
+
service Service[]
|
|
1109
|
+
ServiceListingSubscription ServiceListingSubscription[]
|
|
1110
|
+
|
|
1111
|
+
@@index([ownerId])
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
model VolunteerService {
|
|
1115
|
+
id String @id @default(cuid())
|
|
1116
|
+
// service Service
|
|
1117
|
+
userId String?
|
|
1118
|
+
user User? @relation(fields: [userId], references: [id])
|
|
1119
|
+
serviceRangeId String?
|
|
1120
|
+
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
1121
|
+
links Link[] @relation("VolunteerServiceLinks")
|
|
1122
|
+
// availableDateTimes ServiceAvailability[] @relation("AvailableDateTimes")
|
|
1123
|
+
fullName String?
|
|
1124
|
+
address String?
|
|
1125
|
+
email String?
|
|
1126
|
+
phone String?
|
|
1127
|
+
agreedToAgreement Boolean? @default(false)
|
|
1128
|
+
description String?
|
|
1129
|
+
status VolunteerServiceStatus?
|
|
1130
|
+
media Media[]
|
|
1131
|
+
|
|
1132
|
+
serviceRatesAssociation ServiceRatesAssociation?
|
|
1133
|
+
|
|
1134
|
+
service Service[]
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
model EventService {
|
|
1138
|
+
id String @id @default(cuid())
|
|
1139
|
+
serviceId String @unique
|
|
1140
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1141
|
+
serviceRangeId String?
|
|
1142
|
+
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
1143
|
+
eventServiceTypes EventServiceType[]
|
|
1144
|
+
eventServiceSubType String?
|
|
1145
|
+
yearsOfExperience YearsOfExperience
|
|
1146
|
+
crowdSizeId String? @unique
|
|
1147
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1148
|
+
goodsOrServices String[]
|
|
1149
|
+
menuItems String?
|
|
1150
|
+
venueTypes String[]
|
|
1151
|
+
secondaryVenueTypes String[] @default([])
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
model EntertainmentService {
|
|
1155
|
+
id String @id @default(cuid())
|
|
1156
|
+
serviceId String @unique
|
|
1157
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1158
|
+
serviceRangeId String?
|
|
1159
|
+
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
1160
|
+
entertainmentServiceTypes EntertainmentServiceType[]
|
|
1161
|
+
entertainmentServiceSubType String?
|
|
1162
|
+
genre MusicGenreType?
|
|
1163
|
+
yearsOfExperience YearsOfExperience
|
|
1164
|
+
crowdSizeId String? @unique
|
|
1165
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1166
|
+
goodsOrServices String[]
|
|
1167
|
+
venueTypes String[]
|
|
1168
|
+
secondaryVenueTypes String[] @default([])
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
model Vendor {
|
|
1172
|
+
id String @id @default(cuid())
|
|
1173
|
+
serviceId String @unique
|
|
1174
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1175
|
+
serviceRangeId String?
|
|
1176
|
+
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
1177
|
+
yearsOfExperience YearsOfExperience
|
|
1178
|
+
crowdSizeId String? @unique
|
|
1179
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1180
|
+
goodsOrServices String[]
|
|
1181
|
+
menuItems String?
|
|
1182
|
+
venueTypes String[]
|
|
1183
|
+
secondaryVenueTypes String[] @default([])
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
model Exhibitor {
|
|
1187
|
+
id String @id @default(cuid())
|
|
1188
|
+
serviceId String @unique
|
|
1189
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1190
|
+
serviceRangeId String?
|
|
1191
|
+
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
1192
|
+
yearsOfExperience YearsOfExperience
|
|
1193
|
+
crowdSizeId String? @unique
|
|
1194
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1195
|
+
goodsOrServices String[]
|
|
1196
|
+
venueTypes String[]
|
|
1197
|
+
secondaryVenueTypes String[] @default([])
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
model Sponsor {
|
|
1201
|
+
id String @id @default(cuid())
|
|
1202
|
+
serviceId String @unique
|
|
1203
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1204
|
+
serviceRangeId String?
|
|
1205
|
+
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
1206
|
+
yearsOfExperience YearsOfExperience
|
|
1207
|
+
crowdSizeId String? @unique
|
|
1208
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
|
|
1209
|
+
goodsOrServices String[]
|
|
1210
|
+
menuItems String?
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
model Venue {
|
|
1214
|
+
id String @id @default(cuid())
|
|
1215
|
+
serviceId String @unique
|
|
1216
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1217
|
+
// serviceConnectionId String? //Check: ?
|
|
1218
|
+
// serviceConnection String?
|
|
1219
|
+
yearsInBusiness YearsOfExperience @default(LessThanOneYear)
|
|
1220
|
+
amenities String[]
|
|
1221
|
+
menuItems String?
|
|
1222
|
+
features String[]
|
|
1223
|
+
venueTypes String[]
|
|
1224
|
+
secondaryVenueTypes String[] @default([])
|
|
1225
|
+
pitch String?
|
|
1226
|
+
capacity Int?
|
|
1227
|
+
anticipatedAttendees Int?
|
|
1228
|
+
trademark Boolean?
|
|
1229
|
+
manager Boolean?
|
|
1230
|
+
allowed String?
|
|
1231
|
+
notAllowed String?
|
|
1232
|
+
vibe String?
|
|
1233
|
+
dress String?
|
|
1234
|
+
|
|
1235
|
+
pricingPlan VenuePricingPlan?
|
|
1236
|
+
// subscriptionStatus SubscriptionStatus?
|
|
1237
|
+
// subscriptionStartDate DateTime?
|
|
1238
|
+
|
|
1239
|
+
bashEvents BashEvent[]
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
model ServicePromoCodeRedemption {
|
|
1243
|
+
id String @id @default(cuid())
|
|
1244
|
+
serviceId String?
|
|
1245
|
+
service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1246
|
+
|
|
1247
|
+
userId String?
|
|
1248
|
+
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1249
|
+
|
|
1250
|
+
code String
|
|
1251
|
+
stripeCouponId String
|
|
1252
|
+
redemptionCount Int
|
|
1253
|
+
|
|
1254
|
+
lastRedeemedOn DateTime
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
// model VenuePricing {
|
|
1258
|
+
// id String @id @default(cuid())
|
|
1259
|
+
// venuePricingPlan VenuePricingPlan
|
|
1260
|
+
// percentageRate Float? @default(0.15)
|
|
1261
|
+
// }
|
|
1262
|
+
|
|
1263
|
+
enum VenuePricingPlan {
|
|
1264
|
+
Percentage
|
|
1265
|
+
Subscription
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
enum ServiceSubscriptionStatus {
|
|
1269
|
+
None
|
|
1270
|
+
Active
|
|
1271
|
+
Trialing
|
|
1272
|
+
Paused
|
|
1273
|
+
Canceled
|
|
1274
|
+
Incomplete
|
|
1275
|
+
IncompleteExpired
|
|
1276
|
+
Unpaid
|
|
1277
|
+
PastDue
|
|
1278
|
+
Suspended
|
|
1279
|
+
Expired
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
model Organization {
|
|
1283
|
+
id String @id @default(cuid())
|
|
1284
|
+
serviceId String @unique
|
|
1285
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1286
|
+
organizationType OrganizationType[]
|
|
1287
|
+
goodsOrServices String[]
|
|
1288
|
+
venueTypes String[]
|
|
1289
|
+
secondaryVenueTypes String[] @default([])
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
enum EventServiceType {
|
|
1293
|
+
Investor
|
|
1294
|
+
LongTermLoan
|
|
1295
|
+
ShortTermLoan
|
|
1296
|
+
EventPlanning
|
|
1297
|
+
Caterer
|
|
1298
|
+
Cleaner
|
|
1299
|
+
Decorator
|
|
1300
|
+
InteriorDesigner
|
|
1301
|
+
RentalEquipmentProvider
|
|
1302
|
+
FoodAndBeverageProvider
|
|
1303
|
+
MediaCapture
|
|
1304
|
+
AVTechnician
|
|
1305
|
+
GraphicDesigner
|
|
1306
|
+
Influencer
|
|
1307
|
+
Promoter
|
|
1308
|
+
CelebrityAppearance
|
|
1309
|
+
CrewHand
|
|
1310
|
+
EventManager
|
|
1311
|
+
VirtualAssistant
|
|
1312
|
+
Consulting
|
|
1313
|
+
Transportation
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
enum EntertainmentServiceType {
|
|
1317
|
+
Emcees
|
|
1318
|
+
DJs
|
|
1319
|
+
Bands
|
|
1320
|
+
SoloMusicians
|
|
1321
|
+
Comedy
|
|
1322
|
+
VarietyActs
|
|
1323
|
+
PerformanceArtists
|
|
1324
|
+
Magic
|
|
1325
|
+
Dancers
|
|
1326
|
+
Aerialists
|
|
1327
|
+
Impersonators
|
|
1328
|
+
Speakers
|
|
1329
|
+
Auctioneers
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
enum OrganizationType {
|
|
1333
|
+
Church
|
|
1334
|
+
GreekLife
|
|
1335
|
+
SocialClub
|
|
1336
|
+
Nonprofit
|
|
1337
|
+
Corporation
|
|
1338
|
+
EducationalInstitution
|
|
1339
|
+
Sports
|
|
1340
|
+
Government
|
|
1341
|
+
Cultural
|
|
1342
|
+
Lifestyle
|
|
1343
|
+
Political
|
|
1344
|
+
Tourism
|
|
1345
|
+
Youth
|
|
1346
|
+
Senior
|
|
1347
|
+
Tradeshow
|
|
1348
|
+
Conference
|
|
1349
|
+
FoodAndBeverage
|
|
1350
|
+
TechAndStartups
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
enum YearsOfExperience {
|
|
1354
|
+
LessThanOneYear
|
|
1355
|
+
OneToThreeYears
|
|
1356
|
+
ThreeToFiveYears
|
|
1357
|
+
FivePlusYears
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
model ServiceRange {
|
|
1361
|
+
id String @id @default(cuid())
|
|
1362
|
+
min Int @default(0)
|
|
1363
|
+
max Int @default(50)
|
|
1364
|
+
volunteerServices VolunteerService[]
|
|
1365
|
+
entertainmentServices EntertainmentService[]
|
|
1366
|
+
EventService EventService[]
|
|
1367
|
+
Vendor Vendor[]
|
|
1368
|
+
Exhibitor Exhibitor[]
|
|
1369
|
+
Sponsor Sponsor[]
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
// model Availability {
|
|
1373
|
+
// id String @id @default(cuid())
|
|
1374
|
+
// dayOfWeek Int
|
|
1375
|
+
// startDateTime DateTime @db.Time
|
|
1376
|
+
// endDateTime DateTime @db.Time
|
|
1377
|
+
// // Rate Rate? @relation(fields: [rateId], references: [id])
|
|
1378
|
+
// rateId String?
|
|
1379
|
+
// }
|
|
1380
|
+
|
|
1381
|
+
// model Rate {
|
|
1382
|
+
// id String @id @default(cuid())
|
|
1383
|
+
// serviceMultipleRatesId String?
|
|
1384
|
+
// serviceMultipleRates Service? @relation("MultipleRates", fields: [serviceMultipleRatesId], references: [id], onDelete: Cascade)
|
|
1385
|
+
// bashEventId String?
|
|
1386
|
+
// bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
1387
|
+
// waitList User[]
|
|
1388
|
+
// price Int @default(0)
|
|
1389
|
+
// title String @default("Free")
|
|
1390
|
+
// sortOrder Int?
|
|
1391
|
+
// description String?
|
|
1392
|
+
// maximumNumberOfHours Int @default(24)
|
|
1393
|
+
// maximumHourCount Int @default(24)
|
|
1394
|
+
// isDonationTier Boolean?
|
|
1395
|
+
// hidden Boolean?
|
|
1396
|
+
// Availability Availability[]
|
|
1397
|
+
|
|
1398
|
+
// // promoCodes BashEventPromoCode[]
|
|
1399
|
+
// @@unique([bashEventId, title])
|
|
1400
|
+
// }
|
|
1401
|
+
|
|
1402
|
+
// model ServiceRate {
|
|
1403
|
+
// id String @id @default(cuid())
|
|
1404
|
+
// rateType ServiceRateType
|
|
1405
|
+
// rate Int?
|
|
1406
|
+
// ServiceSpecialRates ServiceSpecialRates[]
|
|
1407
|
+
// }
|
|
1408
|
+
|
|
1409
|
+
// model ServiceGeneralRates {
|
|
1410
|
+
// id String @id @default(cuid())
|
|
1411
|
+
|
|
1412
|
+
// serviceRateId String?
|
|
1413
|
+
// serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
|
|
1414
|
+
|
|
1415
|
+
// // generalHourlyRate Int
|
|
1416
|
+
// // generalDailyRate Int
|
|
1417
|
+
// // generalWeeklyRate Int
|
|
1418
|
+
// // generalMonthlyRate Int
|
|
1419
|
+
// }
|
|
1420
|
+
|
|
1421
|
+
enum ServiceRateType {
|
|
1422
|
+
General
|
|
1423
|
+
Weekday
|
|
1424
|
+
Special
|
|
1425
|
+
// CLOSED
|
|
1426
|
+
// HOURLY
|
|
1427
|
+
// DAILY
|
|
1428
|
+
// WEEKLY
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
//can optionally be associated with a package
|
|
1432
|
+
model ServiceAddon {
|
|
1433
|
+
id String @id @default(cuid())
|
|
1434
|
+
name String
|
|
1435
|
+
description String
|
|
1436
|
+
price Int?
|
|
1437
|
+
quantity Int
|
|
1438
|
+
|
|
1439
|
+
servicePackage ServicePackage? @relation(fields: [servicePackageId], references: [id], onDelete: Cascade)
|
|
1440
|
+
servicePackageId String?
|
|
1441
|
+
|
|
1442
|
+
serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
|
|
1443
|
+
serviceRatesAssociationId String?
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
model ServicePackage {
|
|
1447
|
+
id String @id @default(cuid())
|
|
1448
|
+
name String
|
|
1449
|
+
description String
|
|
1450
|
+
price Int
|
|
1451
|
+
|
|
1452
|
+
serviceAddons ServiceAddon[]
|
|
1453
|
+
|
|
1454
|
+
serviceRatesAssociation ServiceRatesAssociation? @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
|
|
1455
|
+
serviceRatesAssociationId String?
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
model ServiceRate {
|
|
1459
|
+
id String @id @default(cuid())
|
|
1460
|
+
rateType ServiceRateType
|
|
1461
|
+
hourlyRate Int?
|
|
1462
|
+
dailyRate Int?
|
|
1463
|
+
cleaningFeePerBooking Int?
|
|
1464
|
+
minimumTimeBlockHours Int?
|
|
1465
|
+
serviceSpecialRates ServiceSpecialRates?
|
|
1466
|
+
serviceDailyRates ServiceDailyRates?
|
|
1467
|
+
serviceRatesAssociation ServiceRatesAssociation?
|
|
1468
|
+
|
|
1469
|
+
@@index([rateType])
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
// if isAvailable is false it is closed
|
|
1473
|
+
model ServiceSpecialRates {
|
|
1474
|
+
id String @id @default(cuid())
|
|
1475
|
+
startDate DateTime @db.Date
|
|
1476
|
+
endDate DateTime @db.Date
|
|
1477
|
+
|
|
1478
|
+
serviceRateId String?
|
|
1479
|
+
serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
|
|
1480
|
+
isAvailable Boolean
|
|
1481
|
+
|
|
1482
|
+
serviceRatesAssociationId String
|
|
1483
|
+
serviceRatesAssociation ServiceRatesAssociation @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
|
|
1484
|
+
|
|
1485
|
+
@@unique([serviceRateId])
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
// different days of the week have different rates
|
|
1489
|
+
// can block of certain dates of the year and days of the week as being closed
|
|
1490
|
+
// can have special rates on different days of the year (single or range)
|
|
1491
|
+
// free trial period with promo code (1 or 2 months of listing for free)
|
|
1492
|
+
model ServiceDailyRates {
|
|
1493
|
+
id String @id @default(cuid())
|
|
1494
|
+
dayOfWeek DayOfWeek
|
|
1495
|
+
startTime DateTime @db.Time
|
|
1496
|
+
endTime DateTime @db.Time
|
|
1497
|
+
|
|
1498
|
+
serviceRateId String?
|
|
1499
|
+
serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
|
|
1500
|
+
|
|
1501
|
+
serviceRatesAssociationId String
|
|
1502
|
+
serviceRatesAssociation ServiceRatesAssociation @relation(fields: [serviceRatesAssociationId], references: [id], onDelete: Cascade)
|
|
1503
|
+
|
|
1504
|
+
@@unique([serviceRateId])
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
model ServiceRatesAssociation {
|
|
1508
|
+
id String @id @default(cuid())
|
|
1509
|
+
|
|
1510
|
+
serviceId String?
|
|
1511
|
+
service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1512
|
+
volunteerServiceId String?
|
|
1513
|
+
volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id], onDelete: Cascade)
|
|
1514
|
+
|
|
1515
|
+
serviceGeneralRatesId String?
|
|
1516
|
+
serviceGeneralRates ServiceRate? @relation(fields: [serviceGeneralRatesId], references: [id], onDelete: Cascade)
|
|
1517
|
+
|
|
1518
|
+
serviceDailyRates ServiceDailyRates[]
|
|
1519
|
+
serviceSpecialRates ServiceSpecialRates[]
|
|
1520
|
+
|
|
1521
|
+
addons ServiceAddon[]
|
|
1522
|
+
packages ServicePackage[]
|
|
1523
|
+
|
|
1524
|
+
media Media[]
|
|
1525
|
+
|
|
1526
|
+
@@unique([serviceId])
|
|
1527
|
+
@@unique([volunteerServiceId])
|
|
1528
|
+
@@unique([serviceGeneralRatesId])
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
enum VisibilityPreference {
|
|
1532
|
+
Public
|
|
1533
|
+
Private
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
enum MusicGenreType {
|
|
1537
|
+
Classical
|
|
1538
|
+
Rock
|
|
1539
|
+
HipHop
|
|
1540
|
+
Country
|
|
1541
|
+
Pop
|
|
1542
|
+
EDM
|
|
1543
|
+
Indie
|
|
1544
|
+
Acoustic
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
enum UserRole {
|
|
1548
|
+
User
|
|
1549
|
+
Vendor
|
|
1550
|
+
Sponsor
|
|
1551
|
+
Investor
|
|
1552
|
+
LoanProvider
|
|
1553
|
+
VenueProvider
|
|
1554
|
+
ServiceProvider
|
|
1555
|
+
SuperAdmin
|
|
1556
|
+
Exhibitor
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
model UserLink {
|
|
1560
|
+
id String @id @default(cuid())
|
|
1561
|
+
link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
|
|
1562
|
+
linkId String
|
|
1563
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1564
|
+
userId String
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
model UserRating {
|
|
1568
|
+
id String @id @default(cuid())
|
|
1569
|
+
rating Int
|
|
1570
|
+
comment String?
|
|
1571
|
+
givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
|
|
1572
|
+
userRatingGivenId String
|
|
1573
|
+
givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1574
|
+
userId String
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
model UserRatingGiven {
|
|
1578
|
+
id String @id @default(cuid())
|
|
1579
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1580
|
+
userId String
|
|
1581
|
+
UserRating UserRating[]
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
enum UserStatus {
|
|
1585
|
+
Active
|
|
1586
|
+
Inactive
|
|
1587
|
+
Suspended
|
|
1588
|
+
Deactivated
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
model VerificationToken {
|
|
1592
|
+
identifier String
|
|
1593
|
+
token String @unique
|
|
1594
|
+
expires DateTime
|
|
1595
|
+
|
|
1596
|
+
@@unique([identifier, token])
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
model ServiceLink {
|
|
1600
|
+
id String @id @default(cuid())
|
|
1601
|
+
serviceId String
|
|
1602
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1603
|
+
linkId String
|
|
1604
|
+
link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
|
|
1605
|
+
|
|
1606
|
+
@@index([serviceId])
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
enum ServiceTypes {
|
|
1610
|
+
EventServices
|
|
1611
|
+
EntertainmentServices
|
|
1612
|
+
Vendors
|
|
1613
|
+
Exhibitors
|
|
1614
|
+
Sponsors
|
|
1615
|
+
Venues
|
|
1616
|
+
Organizations
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
enum EntityType {
|
|
1620
|
+
EVENT_SERVICE
|
|
1621
|
+
ENTERTAINMENT_SERVICE
|
|
1622
|
+
VENDOR
|
|
1623
|
+
EXHIBITOR
|
|
1624
|
+
SPONSOR
|
|
1625
|
+
VENUE
|
|
1626
|
+
ORGANIZATION
|
|
1627
|
+
BASH_EVENT // For BashEvents
|
|
1628
|
+
}
|