@bash-app/bash-common 23.0.0 → 23.1.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 +3 -0
- package/src/extendedSchemas.ts +25 -7
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -935,6 +935,7 @@ model VolunteerService {
|
|
|
935
935
|
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
936
936
|
media Media[] @relation("VolunteerServiceMedia")
|
|
937
937
|
links Link[] @relation("VolunteerServiceLinks")
|
|
938
|
+
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
938
939
|
}
|
|
939
940
|
|
|
940
941
|
model EventService {
|
|
@@ -1312,6 +1313,8 @@ model Availability {
|
|
|
1312
1313
|
sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
|
|
1313
1314
|
organizationId String?
|
|
1314
1315
|
organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
|
|
1316
|
+
volunteerServiceId String?
|
|
1317
|
+
volunteerService VolunteerService? @relation("AvailableDateTimes", fields: [volunteerServiceId], references: [id])
|
|
1315
1318
|
}
|
|
1316
1319
|
|
|
1317
1320
|
enum VisibilityPreference {
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -209,6 +209,20 @@ export const VENUE_DATA_TO_INCLUDE = {
|
|
|
209
209
|
amountOfGuests: true,
|
|
210
210
|
} satisfies Prisma.VenueInclude;
|
|
211
211
|
|
|
212
|
+
export const VOLUNTEER_DATA_TO_INCLUDE = {
|
|
213
|
+
business: true,
|
|
214
|
+
availableDateTimes: true,
|
|
215
|
+
links: {
|
|
216
|
+
include: {
|
|
217
|
+
serviceLinks: true,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
media: true,
|
|
221
|
+
serviceRange: true,
|
|
222
|
+
} satisfies Prisma.VolunteerServiceInclude;
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
212
226
|
export interface OrganizationExt extends Organization {
|
|
213
227
|
business: Business;
|
|
214
228
|
availableDateTimes: Availability[];
|
|
@@ -223,6 +237,7 @@ export interface VolunteerServiceExt extends VolunteerService {
|
|
|
223
237
|
serviceRange?: ServiceRange;
|
|
224
238
|
media?: Media[];
|
|
225
239
|
links?: Link[];
|
|
240
|
+
availableDateTimes?: Availability[];
|
|
226
241
|
}
|
|
227
242
|
|
|
228
243
|
|
|
@@ -244,21 +259,24 @@ export interface BusinessExt extends Business {
|
|
|
244
259
|
|
|
245
260
|
export const BUSINESS_DATA_TO_INCLUDE = {
|
|
246
261
|
owner: {
|
|
247
|
-
select: FRONT_END_USER_DATA_TO_SELECT
|
|
262
|
+
select: FRONT_END_USER_DATA_TO_SELECT,
|
|
248
263
|
},
|
|
249
264
|
media: true,
|
|
250
|
-
volunteerService:
|
|
265
|
+
volunteerService: {
|
|
266
|
+
include: VOLUNTEER_DATA_TO_INCLUDE,
|
|
267
|
+
},
|
|
251
268
|
targetAudience: true,
|
|
252
269
|
serviceLinks: {
|
|
253
|
-
include: SERVICE_LINK_DATA_TO_INCLUDE
|
|
270
|
+
include: SERVICE_LINK_DATA_TO_INCLUDE,
|
|
254
271
|
},
|
|
255
272
|
venues: {
|
|
256
|
-
include: VENUE_DATA_TO_INCLUDE
|
|
273
|
+
include: VENUE_DATA_TO_INCLUDE,
|
|
257
274
|
},
|
|
258
275
|
vendors: {
|
|
259
|
-
include: VENDOR_DATA_TO_INCLUDE
|
|
260
|
-
}
|
|
261
|
-
} satisfies Prisma.BusinessInclude
|
|
276
|
+
include: VENDOR_DATA_TO_INCLUDE,
|
|
277
|
+
},
|
|
278
|
+
} satisfies Prisma.BusinessInclude;
|
|
279
|
+
|
|
262
280
|
|
|
263
281
|
export interface ServiceLinkExt extends ServiceLink {
|
|
264
282
|
link: Link;
|