@bash-app/bash-common 9.3.1 → 9.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "9.3.1",
3
+ "version": "9.4.1",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -609,7 +609,7 @@ enum InvestmentType {
609
609
  model Link {
610
610
  id String @id @default(cuid())
611
611
  url String
612
- type String
612
+ type String?
613
613
  icon String?
614
614
  vendorLinks VendorLink[]
615
615
  eventLinks EventLink[]
@@ -968,8 +968,10 @@ model VendorLink {
968
968
 
969
969
  model ServiceLink {
970
970
  id String @id @default(cuid())
971
- servicesId String
972
- service Service @relation(fields: [servicesId], references: [id], onDelete: Cascade)
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
  }
@@ -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