@bash-app/bash-common 21.2.1 → 22.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": "21.2.1",
3
+ "version": "22.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",
@@ -262,6 +262,7 @@ model TicketTier {
262
262
  sortOrder Int?
263
263
  description String?
264
264
  maximumNumberOfTickets Int @default(100)
265
+ maximumTicketCount Int
265
266
  isDonationTier Boolean?
266
267
  hidden Boolean?
267
268
  promoCodes BashEventPromoCode[]
@@ -541,7 +542,7 @@ model CustomBashEventType {
541
542
  model AmountOfGuests {
542
543
  id String @id @default(cuid())
543
544
  bashEvent BashEvent?
544
- venue Venue?
545
+ venue Venue? // Just reference the Venue here, no need to define fields/references
545
546
  exhibitor Exhibitor?
546
547
  eventService EventService?
547
548
  entertainmentService EntertainmentService?
@@ -552,12 +553,13 @@ model AmountOfGuests {
552
553
  ideal Int? @default(35)
553
554
  showMinimumGuests Boolean @default(true)
554
555
  showIdealGuests Boolean @default(true)
555
- venueId String?
556
+ venueId String? @unique // Keep this unique if it's one-to-one
556
557
  eventServiceId String?
557
558
  entertainmentServiceId String?
558
559
  vendorId String?
559
560
  }
560
561
 
562
+
561
563
  enum Privacy {
562
564
  Public
563
565
  ConnectionsOnly
@@ -1146,8 +1148,6 @@ model Venue {
1146
1148
  description String?
1147
1149
  serviceRangeId String @unique
1148
1150
  serviceRange ServiceRange @relation(fields: [serviceRangeId], references: [id], onDelete: Cascade)
1149
- capacityId String? @unique
1150
- capacity AmountOfGuests? @relation(fields: [capacityId], references: [id], onDelete: Cascade)
1151
1151
  amenities String[]
1152
1152
  menuItems String?
1153
1153
  additionalInfo String?
@@ -1169,6 +1169,9 @@ model Venue {
1169
1169
  targetAudienceId String? @unique
1170
1170
  bashesInterestedIn BashEventType[]
1171
1171
  links ServiceLink[]
1172
+ capacity Int? // Maximum number of people the venue can accommodate
1173
+ amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
1174
+ amountOfGuestsId String? @unique
1172
1175
  }
1173
1176
 
1174
1177
  model Organization {
@@ -193,10 +193,14 @@ export interface VenueExt extends Venue {
193
193
  availableDateTimes: Availability[];
194
194
  targetAudience?: TargetAudience | null;
195
195
  links: ServiceLinkExt[];
196
- capacity?: AmountOfGuests | null;
196
+ capacity: number | null; // Removed undefined to match base model
197
197
  media?: Media[];
198
+ amountOfGuests?: AmountOfGuests | null; // Reflecting the correct relation with AmountOfGuests
198
199
  }
199
200
 
201
+
202
+
203
+
200
204
  export const VENUE_DATA_TO_INCLUDE = {
201
205
  business: true,
202
206
  availableDateTimes: true,
@@ -206,6 +210,7 @@ export const VENUE_DATA_TO_INCLUDE = {
206
210
  },
207
211
  capacity: true,
208
212
  media: true,
213
+ amountOfGuests: true,
209
214
  }
210
215
 
211
216
  export interface OrganizationExt extends Organization {