@bash-app/bash-common 16.0.0 → 17.0.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": "16.0.0",
3
+ "version": "17.0.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",
@@ -196,16 +196,16 @@ model Invitation {
196
196
  }
197
197
 
198
198
  model BashEvent {
199
- id String @id @default(cuid())
199
+ id String @id @default(cuid())
200
200
  title String
201
201
  creatorId String
202
- creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
202
+ creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
203
203
  description String?
204
- eventType String @default("Other")
205
- startDateTime DateTime? @default(now())
206
- endDateTime DateTime? @default(now())
204
+ eventType String @default("Other")
205
+ startDateTime DateTime? @default(now())
206
+ endDateTime DateTime? @default(now())
207
207
  ticketTiers TicketTier[]
208
- targetAudience TargetAudience?
208
+ targetAudience BashTargetAudience?
209
209
  amountOfGuests AmountOfGuests?
210
210
  recurrence Recurrence?
211
211
  vibe String?
@@ -215,18 +215,18 @@ model BashEvent {
215
215
  notAllowed String?
216
216
  nonProfit Boolean?
217
217
  nonProfitId String?
218
- privacy Privacy @default(Public)
218
+ privacy Privacy @default(Public)
219
219
  tickets Ticket[]
220
220
  reviews Review[]
221
221
  sponsorships SponsoredEvent[]
222
222
  investments Investment[]
223
223
  capacity Int?
224
224
  location String?
225
- status BashStatus @default(Draft)
225
+ status BashStatus @default(Draft)
226
226
  tags String[]
227
227
  coverPhoto String?
228
228
  media Media[]
229
- club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
229
+ club Club? @relation(fields: [clubId], references: [id], onDelete: SetNull)
230
230
  clubId String?
231
231
  links EventLink[]
232
232
  competitions Competition[]
@@ -499,7 +499,7 @@ enum Privacy {
499
499
  InviteOnly
500
500
  }
501
501
 
502
- model TargetAudience {
502
+ model BashTargetAudience {
503
503
  id String @id @default(cuid())
504
504
  bashEventId String @unique
505
505
  bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
@@ -508,6 +508,8 @@ model TargetAudience {
508
508
  occupation Occupation @default(NoPreference)
509
509
  education Education @default(NoPreference)
510
510
  showOnDetailPage Boolean @default(true)
511
+
512
+ @@map("TargetAudience")
511
513
  }
512
514
 
513
515
  model ServiceTargetAudience {
@@ -517,6 +519,15 @@ model ServiceTargetAudience {
517
519
  occupation Occupation @default(NoPreference)
518
520
  education Education @default(NoPreference)
519
521
  showOnDetailPage Boolean @default(true)
522
+ }
523
+
524
+ model VenueTargetAudience {
525
+ id String @id @default(cuid())
526
+ ageRange AgeRange @default(NoPreference)
527
+ gender Gender @default(NoPreference)
528
+ occupation Occupation @default(NoPreference)
529
+ education Education @default(NoPreference)
530
+ showOnDetailPage Boolean @default(true)
520
531
  Venue Venue? @relation(fields: [venueId], references: [id])
521
532
  venueId String?
522
533
  }
@@ -632,7 +643,7 @@ model Media {
632
643
  businessesReferencingMe Business[]
633
644
  sponsoredEventsReferencingMe SponsoredEvent[]
634
645
  servicesReferencingMe Service[]
635
- venueReferencingMe Venue[]
646
+ venueReferencingMe Venue[]
636
647
  }
637
648
 
638
649
  enum MediaType {
@@ -811,7 +822,6 @@ model Service {
811
822
  postalCode String
812
823
  country String
813
824
  phone String
814
- privacy Privacy @default(Public)
815
825
  title String
816
826
  coverPhoto String?
817
827
  agreedToAgreement Boolean?
@@ -837,39 +847,40 @@ model Service {
837
847
  }
838
848
 
839
849
  model Venue {
840
- id String @id @default(cuid())
841
- service Service? @relation(fields: [serviceId], references: [id])
842
- serviceId String?
843
- venueName String
844
- email String
845
- streetAddress String
846
- city String
847
- state String
848
- postalCode String
849
- country String
850
- phone String
851
- coverPhoto String?
852
- media Media[]
853
- capacity Int?
854
- amenities String[]
855
- additionalInfo String?
856
- features String[]
857
- venueTypes String[]
858
- availableDateTimes Availability[] @relation("AvailableDateTimes")
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")
859
870
  // specialDateTimes Availability[] @relation("SpecialDateTimes")
860
- mission String?
861
- pitch String?
862
- communityInvolvement String?
863
- emergencyContact String?
864
- contactDetails String?
865
- rates String?
866
- cancellationPolicy String?
867
- refundPolicy String?
868
- safetyPolicy String?
869
- crowdSizeId String @unique
870
- crowdSize ServiceRange @relation("CrowdSize", fields: [crowdSizeId], references: [id], onDelete: Cascade)
871
- serviceTargetAudience ServiceTargetAudience[]
872
- bashesInterestedIn BashEventType[]
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[]
873
884
  }
874
885
 
875
886
  enum ServiceTag {
@@ -4,7 +4,7 @@ import {
4
4
  AssociatedBash,
5
5
  BashEvent,
6
6
  Invitation,
7
- TargetAudience,
7
+ BashTargetAudience,
8
8
  Ticket,
9
9
  User,
10
10
  TicketTier, Service, Review, Media, BashComment, Recurrence, Contact,
@@ -37,7 +37,7 @@ export const PRIVATE_USER_ACCOUNT_TO_SELECT = {
37
37
  }
38
38
 
39
39
  export interface BashEventExt extends BashEvent {
40
- targetAudience?: TargetAudience;
40
+ targetAudience?: BashTargetAudience;
41
41
  amountOfGuests?: AmountOfGuests;
42
42
  recurrence?: Recurrence;
43
43
  creator?: PublicUser;