@bash-app/bash-common 28.2.0 → 28.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 +20 -11
- package/src/extendedSchemas.ts +3 -3
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -564,15 +564,14 @@ enum Privacy {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
model TargetAudience {
|
|
567
|
-
id String
|
|
568
|
-
ageRange AgeRange
|
|
569
|
-
gender Gender
|
|
570
|
-
occupation Occupation
|
|
571
|
-
education Education
|
|
572
|
-
showOnDetailPage Boolean
|
|
567
|
+
id String @id @default(cuid())
|
|
568
|
+
ageRange AgeRange[]
|
|
569
|
+
gender Gender[]
|
|
570
|
+
occupation Occupation[]
|
|
571
|
+
education Education[]
|
|
572
|
+
showOnDetailPage Boolean @default(true)
|
|
573
573
|
bashEvent BashEvent?
|
|
574
|
-
service Service?
|
|
575
|
-
serviceId String?
|
|
574
|
+
service Service?
|
|
576
575
|
}
|
|
577
576
|
|
|
578
577
|
enum AgeRange {
|
|
@@ -615,6 +614,13 @@ enum ServiceStatus {
|
|
|
615
614
|
Created
|
|
616
615
|
}
|
|
617
616
|
|
|
617
|
+
enum ServiceCondition {
|
|
618
|
+
Pending
|
|
619
|
+
Published
|
|
620
|
+
Suspended
|
|
621
|
+
Deactivated
|
|
622
|
+
}
|
|
623
|
+
|
|
618
624
|
enum VolunteerServiceStatus {
|
|
619
625
|
Draft
|
|
620
626
|
Pending
|
|
@@ -871,8 +877,9 @@ model AssociatedBash {
|
|
|
871
877
|
model Service {
|
|
872
878
|
id String @id @default(cuid())
|
|
873
879
|
|
|
874
|
-
serviceType
|
|
875
|
-
serviceStatus
|
|
880
|
+
serviceType ServiceTypes
|
|
881
|
+
serviceStatus ServiceStatus @default(Draft)
|
|
882
|
+
serviceCondtion ServiceCondition @default(Pending)
|
|
876
883
|
|
|
877
884
|
//current owner
|
|
878
885
|
ownerId String?
|
|
@@ -912,12 +919,14 @@ model Service {
|
|
|
912
919
|
stripeAccountId String?
|
|
913
920
|
stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Cascade)
|
|
914
921
|
|
|
922
|
+
targetAudienceId String? @unique
|
|
923
|
+
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
|
|
924
|
+
|
|
915
925
|
visibility VisibilityPreference @default(Public)
|
|
916
926
|
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
917
927
|
|
|
918
928
|
bashesInterestedIn BashEventType[]
|
|
919
929
|
bookings Booking[]
|
|
920
|
-
targetAudiences TargetAudience[]
|
|
921
930
|
media Media[]
|
|
922
931
|
ServiceLink ServiceLink[]
|
|
923
932
|
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -159,7 +159,7 @@ export interface ServiceExt extends Service {
|
|
|
159
159
|
availableDateTimes?: Availability[];
|
|
160
160
|
|
|
161
161
|
bookings?: Booking[];
|
|
162
|
-
targetAudiences?: TargetAudience
|
|
162
|
+
targetAudiences?: TargetAudience;
|
|
163
163
|
media?: Media[];
|
|
164
164
|
serviceLinks?: ServiceLinkExt[];
|
|
165
165
|
|
|
@@ -198,12 +198,12 @@ export interface VendorExt extends Vendor {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
export interface VenueExt extends Venue {
|
|
201
|
-
service
|
|
201
|
+
service: ServiceExt;
|
|
202
202
|
crowdSize?: AmountOfGuests;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
export interface OrganizationExt extends Organization {
|
|
206
|
-
service
|
|
206
|
+
service: ServiceExt;
|
|
207
207
|
amountOfGuests?: AmountOfGuests;
|
|
208
208
|
}
|
|
209
209
|
//-----------------------------------------
|