Files
playzer/apps/backend
Jose Selesan fb19458ddf 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.
2026-04-24 15:22:11 -03:00
..
2026-04-17 15:23:51 -03:00

To install dependencies:

bun install

To run:

bun run dev

open http://localhost:3000

Tests

Run all backend tests:

bun run test

Test naming convention

  • *.test.ts or *.spec.ts: service-level tests. These run with the shared Prisma preload at test/support/prisma.mock.ts.
  • *.handler.test.ts: handler-level tests. These should mock the service module locally with mock.module(...) and import the handler after the mock is in place.
  • Keep business logic tests focused on the service layer.
  • Use handler tests only to verify request parsing, status mapping, and response shaping.
  • Put shared Prisma mocking helpers in test/support/.