@bash-app/bash-common 4.1.2 → 4.1.3
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 +34 -21
- package/src/extendedSchemas.ts +3 -2
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -501,6 +501,18 @@ model TargetAudience {
|
|
|
501
501
|
showOnDetailPage Boolean @default(true)
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
+
model ServiceTargetAudience {
|
|
505
|
+
id String @id @default(cuid())
|
|
506
|
+
serviceId String
|
|
507
|
+
ageRange AgeRange @default(NoPreference)
|
|
508
|
+
gender Gender @default(NoPreference)
|
|
509
|
+
occupation Occupation @default(NoPreference)
|
|
510
|
+
education Education @default(NoPreference)
|
|
511
|
+
showOnDetailPage Boolean @default(true)
|
|
512
|
+
|
|
513
|
+
service Service @relation(fields: [serviceId], references: [id])
|
|
514
|
+
}
|
|
515
|
+
|
|
504
516
|
enum AgeRange {
|
|
505
517
|
Eighteen_24
|
|
506
518
|
TwentyFive_34
|
|
@@ -780,27 +792,28 @@ model AssociatedBash {
|
|
|
780
792
|
}
|
|
781
793
|
|
|
782
794
|
model Service {
|
|
783
|
-
id
|
|
784
|
-
ownerId
|
|
785
|
-
owner
|
|
786
|
-
address
|
|
787
|
-
privacy
|
|
788
|
-
title
|
|
789
|
-
coverPhoto
|
|
790
|
-
media
|
|
791
|
-
serviceTypes
|
|
792
|
-
subServiceType
|
|
793
|
-
serviceLinks
|
|
794
|
-
description
|
|
795
|
-
canContact
|
|
796
|
-
musicGenre
|
|
797
|
-
visibility
|
|
798
|
-
bashesInterestedIn
|
|
799
|
-
crowdSizeId
|
|
800
|
-
crowdSize
|
|
801
|
-
serviceRangeId
|
|
802
|
-
serviceRange
|
|
803
|
-
availableDateTimes
|
|
795
|
+
id String @id @default(cuid())
|
|
796
|
+
ownerId String
|
|
797
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
798
|
+
address String
|
|
799
|
+
privacy Privacy @default(Public)
|
|
800
|
+
title String?
|
|
801
|
+
coverPhoto String?
|
|
802
|
+
media Media[]
|
|
803
|
+
serviceTypes ServiceType[]
|
|
804
|
+
subServiceType String?
|
|
805
|
+
serviceLinks ServiceLink[]
|
|
806
|
+
description String?
|
|
807
|
+
canContact Boolean?
|
|
808
|
+
musicGenre MusicGenreType?
|
|
809
|
+
visibility VisibilityPreference @default(Public)
|
|
810
|
+
bashesInterestedIn BashEventType[]
|
|
811
|
+
crowdSizeId String @unique
|
|
812
|
+
crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
813
|
+
serviceRangeId String @unique
|
|
814
|
+
serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
|
|
815
|
+
availableDateTimes DateTime?
|
|
816
|
+
serviceTargetAudience ServiceTargetAudience[]
|
|
804
817
|
}
|
|
805
818
|
|
|
806
819
|
model ServiceRange {
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
User,
|
|
10
10
|
TicketTier, Service, Review, Media, BashComment, Recurrence, Contact,
|
|
11
11
|
BashNotification, BashEventPromoCode,
|
|
12
|
-
Reminder, ServiceRange
|
|
12
|
+
Reminder, ServiceRange,
|
|
13
|
+
ServiceTargetAudience
|
|
13
14
|
} from "@prisma/client";
|
|
14
15
|
|
|
15
16
|
export const FRONT_END_USER_DATA_TO_SELECT = {
|
|
@@ -82,7 +83,7 @@ export interface ServiceExt extends Service {
|
|
|
82
83
|
media: Media[];
|
|
83
84
|
crowdSize: ServiceRange;
|
|
84
85
|
serviceRange: ServiceRange;
|
|
85
|
-
targetAudience:
|
|
86
|
+
targetAudience: ServiceTargetAudience;
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
export const SERVICE_DATA_TO_INCLUDE = {
|