Validate room-stay bounds on booking expected-date updates
All checks were successful
build-and-deploy / build-deploy (push) Successful in 39s

This commit is contained in:
androidlover5842
2026-02-08 16:56:24 +05:30
parent cac3f272a2
commit 924bf2c614
2 changed files with 57 additions and 0 deletions

View File

@@ -1822,8 +1822,11 @@ BOOKING APIS
What it does:
- Updates planned dates on booking (expectedCheckInAt, expectedCheckOutAt), not actual checkout.
- Updates booking-level expected dates only; does not auto-change room_stay checkout timestamps.
- For OPEN bookings: can update both expected check-in and expected check-out.
- For OPEN bookings with linked room stays: each stay start/end must remain inside expected booking window.
- For CHECKED_IN: can update only expectedCheckOutAt (check-in change is blocked).
- For CHECKED_IN bookings with linked room stays: stay start must be >= booking check-in and < expected check-out; stay end cannot be after expected check-out.
- For CHECKED_OUT / CANCELLED / NO_SHOW: returns conflict (Booking closed).
- Validates range: if both are present, checkout must be after checkin.
- Returns 204 No Content.
@@ -1853,6 +1856,7 @@ BOOKING APIS
- 409 Conflict
- "Cannot change expected check-in after check-in"
- "Booking closed" for CHECKED_OUT, CANCELLED, NO_SHOW
- Room stay bounds outside allowed expected window for OPEN/CHECKED_IN booking
- Update booking billing policy API is this one: