@bash-app/bash-common 17.0.0 → 17.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "17.0.0",
3
+ "version": "17.1.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -528,8 +528,7 @@ model VenueTargetAudience {
528
528
  occupation Occupation @default(NoPreference)
529
529
  education Education @default(NoPreference)
530
530
  showOnDetailPage Boolean @default(true)
531
- Venue Venue? @relation(fields: [venueId], references: [id])
532
- venueId String?
531
+ venue Venue? @relation("VenueTargetAudience")
533
532
  }
534
533
 
535
534
  enum AgeRange {
@@ -847,40 +846,41 @@ model Service {
847
846
  }
848
847
 
849
848
  model Venue {
850
- id String @id @default(cuid())
851
- service Service? @relation(fields: [serviceId], references: [id])
852
- serviceId String?
853
- venueName String
854
- email String
855
- streetAddress String
856
- city String
857
- state String
858
- postalCode String
859
- country String
860
- phone String
861
- coverPhoto String?
862
- media Media[]
863
- visibility VisibilityPreference @default(Public)
864
- capacity Int?
865
- amenities String[]
866
- additionalInfo String?
867
- features String[]
868
- venueTypes String[]
869
- availableDateTimes Availability[] @relation("AvailableDateTimes")
849
+ id String @id @default(cuid())
850
+ service Service? @relation(fields: [serviceId], references: [id])
851
+ serviceId String?
852
+ venueName String
853
+ email String
854
+ streetAddress String
855
+ city String
856
+ state String
857
+ postalCode String
858
+ country String
859
+ phone String
860
+ coverPhoto String?
861
+ media Media[]
862
+ visibility VisibilityPreference @default(Public)
863
+ capacity Int?
864
+ amenities String[]
865
+ additionalInfo String?
866
+ features String[]
867
+ venueTypes String[]
868
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
870
869
  // specialDateTimes Availability[] @relation("SpecialDateTimes")
871
- mission String?
872
- pitch String?
873
- communityInvolvement String?
874
- emergencyContact String?
875
- contactDetails String?
876
- rates String?
877
- cancellationPolicy String?
878
- refundPolicy String?
879
- safetyPolicy String?
880
- crowdSizeId String @unique
881
- crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
882
- targetAudience VenueTargetAudience[]
883
- bashesInterestedIn BashEventType[]
870
+ mission String?
871
+ pitch String?
872
+ communityInvolvement String?
873
+ emergencyContact String?
874
+ contactDetails String?
875
+ rates String?
876
+ cancellationPolicy String?
877
+ refundPolicy String?
878
+ safetyPolicy String?
879
+ crowdSizeId String @unique
880
+ crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
881
+ targetAudience VenueTargetAudience @relation("VenueTargetAudience", fields: [venueTargetAudienceId], references: [id])
882
+ bashesInterestedIn BashEventType[]
883
+ venueTargetAudienceId String @unique
884
884
  }
885
885
 
886
886
  enum ServiceTag {
@@ -14,6 +14,7 @@ import {
14
14
  Checkout,
15
15
  ServiceLink,
16
16
  Link, Venue, Availability,
17
+ VenueTargetAudience,
17
18
  } from "@prisma/client";
18
19
 
19
20
  export const FRONT_END_USER_DATA_TO_SELECT = {
@@ -125,11 +126,13 @@ export const BASH_EVENT_DATA_TO_REMOVE: RemoveCommonProperties<BashEvent, BashEv
125
126
  export interface VenueExt extends Venue {
126
127
  service: Service;
127
128
  availableDateTimes: Availability[];
129
+ targetAudience: VenueTargetAudience;
128
130
  }
129
131
 
130
132
  export const VENUE_DATA_TO_INCLUDE = {
131
133
  service: true,
132
134
  availableDateTimes: true,
135
+ targetAudience: true,
133
136
  }
134
137
 
135
138
  export interface ServiceExt extends Service {