@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -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 String @id @default(cuid())
784
- ownerId String
785
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
786
- address String
787
- privacy Privacy @default(Public)
788
- title String?
789
- coverPhoto String?
790
- media Media[]
791
- serviceTypes ServiceType[]
792
- subServiceType String?
793
- serviceLinks ServiceLink[]
794
- description String?
795
- canContact Boolean?
796
- musicGenre MusicGenreType?
797
- visibility VisibilityPreference @default(Public)
798
- bashesInterestedIn BashEventType[]
799
- crowdSizeId String @unique
800
- crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
801
- serviceRangeId String @unique
802
- serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
803
- availableDateTimes DateTime?
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 {
@@ -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: TargetAudience;
86
+ targetAudience: ServiceTargetAudience;
86
87
  }
87
88
 
88
89
  export const SERVICE_DATA_TO_INCLUDE = {