@bash-app/bash-common 9.3.1 → 9.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 +4 -2
- package/src/extendedSchemas.ts +5 -3
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -968,8 +968,10 @@ model VendorLink {
|
|
|
968
968
|
|
|
969
969
|
model ServiceLink {
|
|
970
970
|
id String @id @default(cuid())
|
|
971
|
-
|
|
972
|
-
service Service @relation(fields: [
|
|
971
|
+
serviceId String
|
|
972
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
973
973
|
linkId String
|
|
974
974
|
link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
|
|
975
|
+
|
|
976
|
+
@@index([serviceId])
|
|
975
977
|
}
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -124,6 +124,10 @@ export interface ServiceLinkExt extends ServiceLink {
|
|
|
124
124
|
link: Link;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
export const SERVICE_LINK_DATA_TO_INCLUDE = {
|
|
128
|
+
link: true,
|
|
129
|
+
}
|
|
130
|
+
|
|
127
131
|
export const SERVICE_DATA_TO_INCLUDE = {
|
|
128
132
|
owner: {
|
|
129
133
|
select: FRONT_END_USER_DATA_TO_SELECT
|
|
@@ -132,9 +136,7 @@ export const SERVICE_DATA_TO_INCLUDE = {
|
|
|
132
136
|
crowdSize: true,
|
|
133
137
|
serviceRange: true,
|
|
134
138
|
serviceLinks: {
|
|
135
|
-
include:
|
|
136
|
-
link: true
|
|
137
|
-
}
|
|
139
|
+
include: SERVICE_LINK_DATA_TO_INCLUDE
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
|