Repository navigation
Store bookings and cancellations #84
Copy link
Copy link
Open
Labels
featureIntroduces a new and complete featureIntroduces a new and complete featurehotel dataGuestline PMS exports, parsers, upload endpoint and checksGuestline PMS exports, parsers, upload endpoint and checks
Description
Blocked by: #83
Problem
We only know each night's final numbers, not when its rooms were booked or cancelled. Without booking and cancellation dates we can't tell a night that sold out weeks early (priced too low) from one that sold out at the last minute (priced about right).
Goal
Every booking and cancellation from the Guestline exports is stored, linked by booking reference, and loading the same file again changes nothing.
Scope
- A
bookingstable: booking reference, hotel, booking date, arrival, departure, nights, room type code, company, agent, ADR and reservation value (nett), cancelled flag. - A
booking_cancellationstable: booking reference, cancellation date, reason code, arrival, departure, estimated lost revenue. - Parsers for Daily New Reservations and Cancellations that drop guest columns and map Guestline's column names to ours.
- Models, repository and services through every layer, following the
Widgetslice; idempotent upserts keyed on booking reference. - An Alembic migration that applies and rolls back.
- Not in scope: the upload endpoint (a separate issue) and features built from bookings.
Considerations
- A booking reference may cover several rooms (
/1,/2); store it as Guestline gives it until we know what the suffix means. - Store money as nett so every report agrees; note the VAT rate if converting.
- Room types: keep Guestline's code on each booking even though recommendations use one room type for now.
- Bookings later amended may change dates; note what we can and can't see.
Acceptance criteria
- Sample files of both reports load into the new tables.
- Loading the same file twice doesn't add rows.
- No guest names or profile references are stored.
- The migration upgrades and downgrades cleanly.
- Tests cover parsing, upserts and malformed rows.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureIntroduces a new and complete featureIntroduces a new and complete featurehotel dataGuestline PMS exports, parsers, upload endpoint and checksGuestline PMS exports, parsers, upload endpoint and checks
Activity