feat: add price field to CourtBooking model and related schemas

- Added `price` field to `CourtBookingScalarFieldEnum` in `prismaNamespace.ts` and `prismaNamespaceBrowser.ts`.
- Updated `CourtBooking` model to include average and sum aggregations for `price`.
- Enhanced input types and aggregate input types to support `price`.
- Modified `public-booking.service.ts` to calculate and return price information for bookings.
- Updated frontend components to display price information in booking confirmation and selection pages.
- Introduced `priceRangeSchema` in API contract to validate price ranges.
This commit is contained in:
Jose Selesan
2026-04-24 15:22:11 -03:00
parent c63f0f2109
commit fb19458ddf
10 changed files with 290 additions and 4 deletions

View File

@@ -82,6 +82,7 @@ model CourtBooking {
bookingDate DateTime @map("booking_date") @db.Date
startTime String @map("start_time") @db.VarChar(5)
endTime String @map("end_time") @db.VarChar(5)
price Decimal? @map("price") @db.Decimal(19, 2)
customerName String @map("customer_name") @db.VarChar(120)
customerPhone String @map("customer_phone") @db.VarChar(30)
status CourtBookingStatus @default(CONFIRMED)