@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "20.2.0",
3
+ "version": "20.4.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -256,7 +256,7 @@ model Checkout {
256
256
  checkoutDateTime DateTime? @default(now())
257
257
  tickets Ticket[]
258
258
  stripeCheckoutSessionId String? @unique
259
- bookings Booking[]
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("BookingsISent", fields: [forUserId], references: [id])
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 String @id @default(cuid())
874
- ownerId String
875
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
876
- dateCreated DateTime @default(now())
877
- email String
878
- location String?
879
- streetAddress String
880
- city String
881
- state String
882
- postalCode String
883
- country String
884
- phone String
885
- name String @default("New Service")
886
- coverPhoto String?
887
- agreedToAgreement Boolean?
888
- media Media[]
889
- serviceTypes ServiceType[]
890
- customServiceTag String[]
891
- yearsOfExperince YearsOfExperience @default(LessThanOneYear)
892
- serviceLinks ServiceLink[]
893
- description String?
894
- canContact Boolean?
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 VisibilityPreference @default(Public)
892
+ visibility VisibilityPreference @default(Public)
897
893
  // bashesInterestedIn BashEventType[]
898
- status ServiceStatus @default(Draft)
899
- venues Venue[]
900
- serviceRangeId String @unique
901
- serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
902
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
903
- targetAudienceId String? @unique
904
- eventService EventService[]
905
- entertainmentService EntertainmentService[]
906
- vendor Vendor[]
907
- exhibitor Exhibitor[]
908
- sponsor Sponsor[]
909
- organization Organization[]
910
- trademark String?
911
- manager String?
912
- dba String?
913
- contactPerson String?
914
- contactPhone String?
915
- contactEmail String?
916
- businessPhone String?
917
- bookings Booking[]
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])
@@ -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
- vendor?: Vendor[];
217
- exhibitor?: Exhibitor[];
218
- sponsor?: Sponsor[];
219
- organization?: Organization[];
224
+ vendors?: Vendor[];
225
+ exhibitors?: Exhibitor[];
226
+ sponsors?: Sponsor[];
227
+ organizations?: Organization[];
220
228
  bookings?: Booking[];
221
- serviceType?: ServiceType[];
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