@bash-app/bash-common 23.0.0 → 23.1.1
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 -8
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,19 @@ 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
|
+
links: {
|
|
215
|
+
include: {
|
|
216
|
+
serviceLinks: true,
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
media: true,
|
|
220
|
+
serviceRange: true,
|
|
221
|
+
} satisfies Prisma.VolunteerServiceInclude;
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
212
225
|
export interface OrganizationExt extends Organization {
|
|
213
226
|
business: Business;
|
|
214
227
|
availableDateTimes: Availability[];
|
|
@@ -220,9 +233,10 @@ export interface OrganizationExt extends Organization {
|
|
|
220
233
|
}
|
|
221
234
|
|
|
222
235
|
export interface VolunteerServiceExt extends VolunteerService {
|
|
223
|
-
serviceRange?: ServiceRange;
|
|
236
|
+
serviceRange?: ServiceRange | null;
|
|
224
237
|
media?: Media[];
|
|
225
238
|
links?: Link[];
|
|
239
|
+
availableDateTimes?: Availability[];
|
|
226
240
|
}
|
|
227
241
|
|
|
228
242
|
|
|
@@ -244,21 +258,24 @@ export interface BusinessExt extends Business {
|
|
|
244
258
|
|
|
245
259
|
export const BUSINESS_DATA_TO_INCLUDE = {
|
|
246
260
|
owner: {
|
|
247
|
-
select: FRONT_END_USER_DATA_TO_SELECT
|
|
261
|
+
select: FRONT_END_USER_DATA_TO_SELECT,
|
|
248
262
|
},
|
|
249
263
|
media: true,
|
|
250
|
-
volunteerService:
|
|
264
|
+
volunteerService: {
|
|
265
|
+
include: VOLUNTEER_DATA_TO_INCLUDE,
|
|
266
|
+
},
|
|
251
267
|
targetAudience: true,
|
|
252
268
|
serviceLinks: {
|
|
253
|
-
include: SERVICE_LINK_DATA_TO_INCLUDE
|
|
269
|
+
include: SERVICE_LINK_DATA_TO_INCLUDE,
|
|
254
270
|
},
|
|
255
271
|
venues: {
|
|
256
|
-
include: VENUE_DATA_TO_INCLUDE
|
|
272
|
+
include: VENUE_DATA_TO_INCLUDE,
|
|
257
273
|
},
|
|
258
274
|
vendors: {
|
|
259
|
-
include: VENDOR_DATA_TO_INCLUDE
|
|
260
|
-
}
|
|
261
|
-
} satisfies Prisma.BusinessInclude
|
|
275
|
+
include: VENDOR_DATA_TO_INCLUDE,
|
|
276
|
+
},
|
|
277
|
+
} satisfies Prisma.BusinessInclude;
|
|
278
|
+
|
|
262
279
|
|
|
263
280
|
export interface ServiceLinkExt extends ServiceLink {
|
|
264
281
|
link: Link;
|