@bash-app/bash-common 10.5.0 → 10.7.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 +6 -0
- package/src/extendedSchemas.ts +13 -2
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -555,6 +555,11 @@ enum BashStatus {
|
|
|
555
555
|
Published
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
+
enum ServiceStatus {
|
|
559
|
+
Draft
|
|
560
|
+
Created
|
|
561
|
+
}
|
|
562
|
+
|
|
558
563
|
model DocumentID {
|
|
559
564
|
id String @id @default(cuid())
|
|
560
565
|
givenName String?
|
|
@@ -830,6 +835,7 @@ model Service {
|
|
|
830
835
|
serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
|
|
831
836
|
availableDateTimes String[] /// Stored in format: ["startDateTime,endDateTime",...]
|
|
832
837
|
serviceTargetAudience ServiceTargetAudience[]
|
|
838
|
+
status ServiceStatus @default(Draft)
|
|
833
839
|
|
|
834
840
|
@@index([email])
|
|
835
841
|
@@index([phone])
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ServiceTargetAudience,
|
|
14
14
|
Checkout,
|
|
15
15
|
ServiceLink,
|
|
16
|
-
Link
|
|
16
|
+
Link,
|
|
17
17
|
} from "@prisma/client";
|
|
18
18
|
|
|
19
19
|
export const FRONT_END_USER_DATA_TO_SELECT = {
|
|
@@ -67,7 +67,6 @@ export const BASH_EVENT_DATA_TO_INCLUDE = {
|
|
|
67
67
|
eventTasks: true,
|
|
68
68
|
media: true,
|
|
69
69
|
promoCodes: true,
|
|
70
|
-
...BASH_EVENT_DATA_TO_SELECT,
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
export const BASH_EVENT_DATA_TO_CLONE = [
|
|
@@ -205,6 +204,18 @@ export interface ReviewExt extends Review {
|
|
|
205
204
|
comments: BashComment[];
|
|
206
205
|
}
|
|
207
206
|
|
|
207
|
+
export interface ContactExt extends Contact {
|
|
208
|
+
contactUser: User;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export const CONTACT_DATA_TO_INCLUDE = {
|
|
212
|
+
user: {
|
|
213
|
+
select: FRONT_END_USER_DATA_TO_SELECT
|
|
214
|
+
},
|
|
215
|
+
media: true
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
|
|
208
219
|
export interface UserExtraData extends User {
|
|
209
220
|
password?: string;
|
|
210
221
|
otp?: string;
|