@bash-app/bash-common 30.24.0 → 30.26.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/package.json +1 -1
- package/prisma/schema.prisma +67 -21
- package/src/extendedSchemas.ts +4 -0
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -7,8 +7,8 @@ generator client {
|
|
|
7
7
|
|
|
8
8
|
datasource db {
|
|
9
9
|
provider = "postgresql"
|
|
10
|
-
url = env("POSTGRES_PRISMA_URL")
|
|
11
|
-
directUrl = env("POSTGRES_URL_NON_POOLING")
|
|
10
|
+
url = env("POSTGRES_PRISMA_URL")
|
|
11
|
+
directUrl = env("POSTGRES_URL_NON_POOLING")
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
model Club {
|
|
@@ -358,32 +358,48 @@ model TicketTier {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
model Ticket {
|
|
361
|
-
id String
|
|
361
|
+
id String @id @default(cuid())
|
|
362
362
|
ownerId String
|
|
363
|
-
owner User
|
|
363
|
+
owner User @relation("TicketsIOwn", fields: [ownerId], references: [id])
|
|
364
364
|
bashEventId String
|
|
365
|
-
bashEvent BashEvent
|
|
365
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id])
|
|
366
366
|
ticketTierId String?
|
|
367
|
-
ticketTier TicketTier?
|
|
367
|
+
ticketTier TicketTier? @relation(fields: [ticketTierId], references: [id])
|
|
368
368
|
validDate DateTime?
|
|
369
369
|
forUserId String?
|
|
370
|
-
forUser User?
|
|
370
|
+
forUser User? @relation("TicketsISent", fields: [forUserId], references: [id])
|
|
371
371
|
fullName String?
|
|
372
372
|
email String?
|
|
373
373
|
paidOn DateTime?
|
|
374
374
|
allowPromiseToPay Boolean?
|
|
375
|
-
status TicketStatus
|
|
375
|
+
status TicketStatus @default(Pending)
|
|
376
376
|
isFreeGuest Boolean?
|
|
377
377
|
geoFenceCheckInUnnecessary Boolean?
|
|
378
378
|
checkedInAt DateTime?
|
|
379
379
|
checkedOutAt DateTime?
|
|
380
380
|
invitationId String?
|
|
381
|
-
invitation Invitation?
|
|
381
|
+
invitation Invitation? @relation("TicketsForInvitation", fields: [invitationId], references: [id])
|
|
382
382
|
checkoutId String?
|
|
383
|
-
checkout Checkout?
|
|
384
|
-
checkedInMethod
|
|
383
|
+
checkout Checkout? @relation(fields: [checkoutId], references: [id])
|
|
384
|
+
checkedInMethod String? @default("manual")
|
|
385
|
+
waitlistPosition Int? // Position in the waitlist
|
|
386
|
+
waitlistJoinedAt DateTime? // When they joined the waitlist
|
|
387
|
+
waitlistNotifiedAt DateTime? // When they were notified of available spot
|
|
388
|
+
waitlistExpiresAt DateTime? // When their waitlist spot expires
|
|
389
|
+
checkInLocation String? // Where they checked in
|
|
390
|
+
checkOutLocation String? // Where they checked out
|
|
391
|
+
checkOutMethod String? @default("manual")
|
|
392
|
+
lastLocationUpdate DateTime? // For tracking if they're still in the venue
|
|
393
|
+
validationAttempts Int @default(0)
|
|
394
|
+
lastValidationAttempt DateTime?
|
|
395
|
+
lastValidatedBy String? // User ID who last validated
|
|
396
|
+
transfers TicketTransfer[]
|
|
397
|
+
metadata TicketMetadata[]
|
|
398
|
+
waitlistUser User? @relation("TicketsOnWaitlist", fields: [waitlistUserId], references: [id])
|
|
399
|
+
waitlistUserId String?
|
|
385
400
|
|
|
386
401
|
@@index([bashEventId])
|
|
402
|
+
@@index([waitlistUserId])
|
|
387
403
|
}
|
|
388
404
|
|
|
389
405
|
enum TicketStatus {
|
|
@@ -392,6 +408,33 @@ enum TicketStatus {
|
|
|
392
408
|
Missed
|
|
393
409
|
CheckedIn
|
|
394
410
|
LeftRadius
|
|
411
|
+
Pending
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
model TicketTransfer {
|
|
415
|
+
id String @id @default(cuid())
|
|
416
|
+
ticket Ticket @relation(fields: [ticketId], references: [id])
|
|
417
|
+
ticketId String
|
|
418
|
+
fromUser User @relation("TransfersFrom", fields: [fromUserId], references: [id])
|
|
419
|
+
fromUserId String
|
|
420
|
+
toUser User @relation("TransfersTo", fields: [toUserId], references: [id])
|
|
421
|
+
toUserId String
|
|
422
|
+
timestamp DateTime
|
|
423
|
+
reason String?
|
|
424
|
+
|
|
425
|
+
@@index([ticketId])
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
model TicketMetadata {
|
|
429
|
+
id String @id @default(cuid())
|
|
430
|
+
ticket Ticket @relation(fields: [ticketId], references: [id])
|
|
431
|
+
ticketId String
|
|
432
|
+
key String
|
|
433
|
+
value String
|
|
434
|
+
createdAt DateTime @default(now())
|
|
435
|
+
updatedAt DateTime @updatedAt
|
|
436
|
+
|
|
437
|
+
@@index([ticketId])
|
|
395
438
|
}
|
|
396
439
|
|
|
397
440
|
// enum BookingStatus {
|
|
@@ -957,8 +1000,13 @@ model User {
|
|
|
957
1000
|
ownedServices Service[] @relation("OwnedService")
|
|
958
1001
|
createdServices Service[] @relation("CreatedService")
|
|
959
1002
|
createdEvents BashEvent[] @relation("CreatedEvent")
|
|
1003
|
+
checkouts Checkout[]
|
|
960
1004
|
ticketsISent Ticket[] @relation("TicketsISent")
|
|
961
1005
|
ticketsIOwn Ticket[] @relation("TicketsIOwn")
|
|
1006
|
+
transfersFrom TicketTransfer[] @relation("TransfersFrom")
|
|
1007
|
+
transfersTo TicketTransfer[] @relation("TransfersTo")
|
|
1008
|
+
ticketsOnWaitlist Ticket[] @relation("TicketsOnWaitlist")
|
|
1009
|
+
ticketTiersWaitListsIveJoined TicketTier[]
|
|
962
1010
|
reviews Review[]
|
|
963
1011
|
sponsorships SponsoredEvent[]
|
|
964
1012
|
investments Investment[]
|
|
@@ -995,8 +1043,6 @@ model User {
|
|
|
995
1043
|
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
996
1044
|
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
997
1045
|
eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
|
|
998
|
-
checkouts Checkout[]
|
|
999
|
-
ticketTiersWaitListsIveJoined TicketTier[]
|
|
1000
1046
|
contacts Contact[]
|
|
1001
1047
|
contactLists ContactList[] @relation("UserContactLists")
|
|
1002
1048
|
contactlist ContactList[]
|
|
@@ -1242,16 +1288,16 @@ model Service {
|
|
|
1242
1288
|
additionalInfo String?
|
|
1243
1289
|
coverPhoto String?
|
|
1244
1290
|
|
|
1245
|
-
mission
|
|
1246
|
-
communityInvolvement
|
|
1247
|
-
emergencyContact
|
|
1248
|
-
contactDetails
|
|
1249
|
-
cancellationPolicy
|
|
1291
|
+
mission String?
|
|
1292
|
+
communityInvolvement String?
|
|
1293
|
+
emergencyContact String?
|
|
1294
|
+
contactDetails String?
|
|
1295
|
+
cancellationPolicy ServiceCancellationPolicy? @default(None)
|
|
1250
1296
|
// refundPolicy String?
|
|
1251
1297
|
// insurancePolicy String?
|
|
1252
|
-
availableHours
|
|
1253
|
-
allowsInstantBooking
|
|
1254
|
-
instantBookingLeadTimeHours Int
|
|
1298
|
+
availableHours String?
|
|
1299
|
+
allowsInstantBooking Boolean @default(false)
|
|
1300
|
+
instantBookingLeadTimeHours Int @default(0)
|
|
1255
1301
|
|
|
1256
1302
|
displayGoogleReviewsOnDetailPage Boolean @default(true)
|
|
1257
1303
|
displayBashReviewsOnDetailPage Boolean @default(true)
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -50,6 +50,8 @@ import {
|
|
|
50
50
|
ServiceBooking,
|
|
51
51
|
ServiceBookingPriceBreakdown,
|
|
52
52
|
ServiceBookingFee,
|
|
53
|
+
TicketTransfer,
|
|
54
|
+
TicketMetadata,
|
|
53
55
|
} from "@prisma/client";
|
|
54
56
|
import { SERVICE_LINK_DATA_TO_INCLUDE } from "./definitions";
|
|
55
57
|
import { serviceKeysArray } from "./utils/service/serviceUtils";
|
|
@@ -686,6 +688,8 @@ export interface TicketExt extends Ticket {
|
|
|
686
688
|
owner: PublicUser;
|
|
687
689
|
forUser: PublicUser;
|
|
688
690
|
checkout?: Checkout;
|
|
691
|
+
transfers?: TicketTransfer[];
|
|
692
|
+
metadata?: TicketMetadata[];
|
|
689
693
|
}
|
|
690
694
|
|
|
691
695
|
export interface CheckoutExt extends Checkout {
|