@bash-app/bash-common 20.2.0 → 20.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/prisma/schema.prisma +46 -51
- package/src/extendedSchemas.ts +16 -5
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -256,7 +256,7 @@ model Checkout {
|
|
|
256
256
|
checkoutDateTime DateTime? @default(now())
|
|
257
257
|
tickets Ticket[]
|
|
258
258
|
stripeCheckoutSessionId String? @unique
|
|
259
|
-
bookings
|
|
259
|
+
bookings Booking[]
|
|
260
260
|
|
|
261
261
|
@@index(bashEventId)
|
|
262
262
|
}
|
|
@@ -334,13 +334,11 @@ enum BookingStatus {
|
|
|
334
334
|
|
|
335
335
|
model Booking {
|
|
336
336
|
id String @id @default(cuid())
|
|
337
|
-
ownerId String
|
|
338
|
-
owner User @relation("BookingsIHave", fields: [ownerId], references: [id])
|
|
339
337
|
serviceId String
|
|
340
338
|
service Service @relation(fields: [serviceId], references: [id])
|
|
341
339
|
validDate DateTime?
|
|
342
340
|
forUserId String?
|
|
343
|
-
forUser User? @relation(
|
|
341
|
+
forUser User? @relation(fields: [forUserId], references: [id])
|
|
344
342
|
fullName String?
|
|
345
343
|
email String?
|
|
346
344
|
paidOn DateTime?
|
|
@@ -353,7 +351,6 @@ model Booking {
|
|
|
353
351
|
checkout Checkout? @relation(fields: [checkoutId], references: [id])
|
|
354
352
|
|
|
355
353
|
@@index([serviceId])
|
|
356
|
-
@@index([ownerId])
|
|
357
354
|
@@index([forUserId])
|
|
358
355
|
@@index([checkoutId])
|
|
359
356
|
}
|
|
@@ -835,9 +832,8 @@ model User {
|
|
|
835
832
|
ticketTiersWaitListsIveJoined TicketTier[]
|
|
836
833
|
contacts Contact[]
|
|
837
834
|
bashEventPromoCodesIUsed BashEventPromoCode[]
|
|
838
|
-
bookingsSent Booking[] @relation("BookingsISent")
|
|
839
|
-
bookingsReceived Booking[] @relation("BookingsIHave")
|
|
840
835
|
ServiceCheckout ServiceCheckout[]
|
|
836
|
+
bookingForMe Booking[]
|
|
841
837
|
}
|
|
842
838
|
|
|
843
839
|
model Contact {
|
|
@@ -870,57 +866,56 @@ model AssociatedBash {
|
|
|
870
866
|
}
|
|
871
867
|
|
|
872
868
|
model Service {
|
|
873
|
-
id
|
|
874
|
-
ownerId
|
|
875
|
-
owner
|
|
876
|
-
dateCreated
|
|
877
|
-
email
|
|
878
|
-
location
|
|
879
|
-
streetAddress
|
|
880
|
-
city
|
|
881
|
-
state
|
|
882
|
-
postalCode
|
|
883
|
-
country
|
|
884
|
-
phone
|
|
885
|
-
name
|
|
886
|
-
coverPhoto
|
|
887
|
-
agreedToAgreement
|
|
888
|
-
media
|
|
889
|
-
serviceTypes
|
|
890
|
-
customServiceTag
|
|
891
|
-
yearsOfExperince
|
|
892
|
-
serviceLinks
|
|
893
|
-
description
|
|
894
|
-
canContact
|
|
869
|
+
id String @id @default(cuid())
|
|
870
|
+
ownerId String
|
|
871
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
872
|
+
dateCreated DateTime @default(now())
|
|
873
|
+
email String
|
|
874
|
+
location String?
|
|
875
|
+
streetAddress String
|
|
876
|
+
city String
|
|
877
|
+
state String
|
|
878
|
+
postalCode String
|
|
879
|
+
country String
|
|
880
|
+
phone String
|
|
881
|
+
name String @default("New Service")
|
|
882
|
+
coverPhoto String?
|
|
883
|
+
agreedToAgreement Boolean?
|
|
884
|
+
media Media[]
|
|
885
|
+
serviceTypes ServiceType[]
|
|
886
|
+
customServiceTag String[]
|
|
887
|
+
yearsOfExperince YearsOfExperience @default(LessThanOneYear)
|
|
888
|
+
serviceLinks ServiceLink[]
|
|
889
|
+
description String?
|
|
890
|
+
canContact Boolean?
|
|
895
891
|
// musicGenre MusicGenreType?
|
|
896
|
-
visibility
|
|
892
|
+
visibility VisibilityPreference @default(Public)
|
|
897
893
|
// bashesInterestedIn BashEventType[]
|
|
898
|
-
status
|
|
899
|
-
venues
|
|
900
|
-
serviceRangeId
|
|
901
|
-
serviceRange
|
|
902
|
-
targetAudience
|
|
903
|
-
targetAudienceId
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
exhibitor
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
trademark
|
|
911
|
-
manager
|
|
912
|
-
dba
|
|
913
|
-
contactPerson
|
|
914
|
-
contactPhone
|
|
915
|
-
contactEmail
|
|
916
|
-
businessPhone
|
|
917
|
-
bookings
|
|
894
|
+
status ServiceStatus @default(Draft)
|
|
895
|
+
venues Venue[]
|
|
896
|
+
serviceRangeId String @unique
|
|
897
|
+
serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
|
|
898
|
+
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
899
|
+
targetAudienceId String? @unique
|
|
900
|
+
eventServices EventService[]
|
|
901
|
+
entertainmentServices EntertainmentService[]
|
|
902
|
+
vendors Vendor[]
|
|
903
|
+
exhibitor Exhibitor[]
|
|
904
|
+
sponsors Sponsor[]
|
|
905
|
+
organizations Organization[]
|
|
906
|
+
trademark String?
|
|
907
|
+
manager String?
|
|
908
|
+
dba String?
|
|
909
|
+
contactPerson String?
|
|
910
|
+
contactPhone String?
|
|
911
|
+
contactEmail String?
|
|
912
|
+
businessPhone String?
|
|
913
|
+
bookings Booking[]
|
|
918
914
|
|
|
919
915
|
@@index([email])
|
|
920
916
|
@@index([phone])
|
|
921
917
|
}
|
|
922
918
|
|
|
923
|
-
|
|
924
919
|
model EventService {
|
|
925
920
|
id String @id @default(cuid())
|
|
926
921
|
service Service? @relation(fields: [serviceId], references: [id])
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -203,6 +203,14 @@ export const VENUE_DATA_TO_INCLUDE = {
|
|
|
203
203
|
capacity: true,
|
|
204
204
|
media: true,
|
|
205
205
|
}
|
|
206
|
+
export const VENDOR_DATA_TO_INCLUDE = {
|
|
207
|
+
service: true,
|
|
208
|
+
availableDateTimes: true,
|
|
209
|
+
targetAudience: true,
|
|
210
|
+
links: true,
|
|
211
|
+
crowdSize: true,
|
|
212
|
+
media: true,
|
|
213
|
+
}
|
|
206
214
|
|
|
207
215
|
export interface ServiceExt extends Service {
|
|
208
216
|
owner: PublicUser;
|
|
@@ -213,12 +221,12 @@ export interface ServiceExt extends Service {
|
|
|
213
221
|
venues?: Venue[];
|
|
214
222
|
eventServices?: EventService[];
|
|
215
223
|
entertainmentServices?: EntertainmentService[];
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
224
|
+
vendors?: Vendor[];
|
|
225
|
+
exhibitors?: Exhibitor[];
|
|
226
|
+
sponsors?: Sponsor[];
|
|
227
|
+
organizations?: Organization[];
|
|
220
228
|
bookings?: Booking[];
|
|
221
|
-
|
|
229
|
+
serviceTypes: ServiceType[];
|
|
222
230
|
}
|
|
223
231
|
|
|
224
232
|
export interface ServiceLinkExt extends ServiceLink {
|
|
@@ -241,6 +249,9 @@ export const SERVICE_DATA_TO_INCLUDE = {
|
|
|
241
249
|
},
|
|
242
250
|
venues: {
|
|
243
251
|
include: VENUE_DATA_TO_INCLUDE
|
|
252
|
+
},
|
|
253
|
+
vendors: {
|
|
254
|
+
include: VENDOR_DATA_TO_INCLUDE
|
|
244
255
|
}
|
|
245
256
|
}
|
|
246
257
|
|