@bash-app/bash-common 29.18.2 → 29.18.4
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 +21 -3
- package/src/definitions.ts +1 -1
- package/src/extendedSchemas.ts +7 -1
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -792,7 +792,7 @@ model GoogleReview {
|
|
|
792
792
|
text String?
|
|
793
793
|
createdAt DateTime @default(now())
|
|
794
794
|
serviceId String
|
|
795
|
-
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
795
|
+
// service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
796
796
|
}
|
|
797
797
|
|
|
798
798
|
model Session {
|
|
@@ -882,6 +882,7 @@ model User {
|
|
|
882
882
|
documentID DocumentID?
|
|
883
883
|
comment BashComment[]
|
|
884
884
|
associatedBashes AssociatedBash[]
|
|
885
|
+
associatedServices AssociatedService[]
|
|
885
886
|
invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
|
|
886
887
|
invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
|
|
887
888
|
notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
|
|
@@ -929,6 +930,21 @@ model AssociatedBash {
|
|
|
929
930
|
@@unique([ownerEmail, bashEventId])
|
|
930
931
|
}
|
|
931
932
|
|
|
933
|
+
model AssociatedService {
|
|
934
|
+
id String @id @default(cuid())
|
|
935
|
+
serviceId String
|
|
936
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
937
|
+
// referralId String? @unique
|
|
938
|
+
// referral Referral? @relation(fields: [referralId], references: [id])
|
|
939
|
+
ownerEmail String?
|
|
940
|
+
ownerUserId String?
|
|
941
|
+
owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
|
|
942
|
+
isOrganizer Boolean?
|
|
943
|
+
isFavorite Boolean?
|
|
944
|
+
|
|
945
|
+
@@unique([ownerEmail, serviceId])
|
|
946
|
+
}
|
|
947
|
+
|
|
932
948
|
//Common data for all services; 1-1 relation between each individual service model such as Venue
|
|
933
949
|
model Service {
|
|
934
950
|
id String @id @default(cuid())
|
|
@@ -948,6 +964,8 @@ model Service {
|
|
|
948
964
|
createdAt DateTime @default(now())
|
|
949
965
|
updatedAt DateTime @updatedAt
|
|
950
966
|
|
|
967
|
+
associatedServicesReferencingMe AssociatedService[]
|
|
968
|
+
|
|
951
969
|
serviceName String?
|
|
952
970
|
tagline String?
|
|
953
971
|
|
|
@@ -978,7 +996,7 @@ model Service {
|
|
|
978
996
|
cancellationPolicy String?
|
|
979
997
|
refundPolicy String?
|
|
980
998
|
insurancePolicy String?
|
|
981
|
-
hoursOfOperation Json? @default("{}")
|
|
999
|
+
// hoursOfOperation Json? @default("{}")
|
|
982
1000
|
|
|
983
1001
|
stripeAccountId String?
|
|
984
1002
|
stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Cascade)
|
|
@@ -1002,7 +1020,7 @@ model Service {
|
|
|
1002
1020
|
venue Venue?
|
|
1003
1021
|
organization Organization?
|
|
1004
1022
|
|
|
1005
|
-
googleReviews GoogleReview[]
|
|
1023
|
+
// googleReviews GoogleReview[]
|
|
1006
1024
|
}
|
|
1007
1025
|
|
|
1008
1026
|
model StripeAccount {
|
package/src/definitions.ts
CHANGED
|
@@ -100,7 +100,7 @@ export const SERVICE_DATA_TO_INCLUDE = {
|
|
|
100
100
|
serviceLinks: {
|
|
101
101
|
include: SERVICE_LINK_DATA_TO_INCLUDE
|
|
102
102
|
},
|
|
103
|
-
googleReviews: true,
|
|
103
|
+
// googleReviews: true,
|
|
104
104
|
} satisfies Prisma.ServiceInclude;
|
|
105
105
|
|
|
106
106
|
// export type ServiceSpecificName = keyof Pick<
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
AmountOfGuests,
|
|
3
3
|
EventTask,
|
|
4
4
|
AssociatedBash,
|
|
5
|
+
AssociatedService,
|
|
5
6
|
BashEvent,
|
|
6
7
|
Invitation,
|
|
7
8
|
Ticket,
|
|
@@ -175,7 +176,7 @@ export interface ServiceExt extends Service {
|
|
|
175
176
|
venue?: Venue;
|
|
176
177
|
organization?: Organization;
|
|
177
178
|
|
|
178
|
-
googleReviews: GoogleReview[];
|
|
179
|
+
// googleReviews: GoogleReview[];
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
export interface EventServiceExt extends EventService {
|
|
@@ -257,6 +258,11 @@ export interface AssociatedBashExt extends AssociatedBash {
|
|
|
257
258
|
invitation: InvitationExt;
|
|
258
259
|
}
|
|
259
260
|
|
|
261
|
+
export interface AssociatedServiceExt extends AssociatedService {
|
|
262
|
+
service: ServiceExt;
|
|
263
|
+
// invitation: InvitationExt;
|
|
264
|
+
}
|
|
265
|
+
|
|
260
266
|
export const ASSOCIATED_BASH_DATA_TO_INCLUDE = {
|
|
261
267
|
bashEvent: {
|
|
262
268
|
include: BASH_EVENT_DATA_TO_INCLUDE
|