Similar to what we had done for slot / attendance mismatches, we should be able to perform sanity checks related to customer's bookings. The check should check for discrepancies between slot documents and bookedSlots documents in every customer's bookings collection. It should produce a result containing data:
orphaned bookings (we don't have slot / bookings mismatched docs as not all slots need to have a corresponding booking, but every booking should have a corresponding slot document):
each orphaned booking should include the slot id, date and customer info (perhaps id and secretKey)
date mismatches - dates for each slot/booking pair should match, any discrepancies should be reported by the check
interval mismatches - if there's a booking with a non existing interval, the interval, as well as available intervals in the slot should be reported
The check should write the result to sanityChecks/<organization>/slotBookings/<timestamp>
Notes
check the existing slot / attendance check and try to provide consistent updates (types, SanityCheckKind, etc...)
try to use the iterable methods to produce a clean and readable data processing pipeline for checks
think of the best structure for report, but don't dwell on it too much as we can easily reconvene on the structure and change it up after the initial pass is dont
Similar to what we had done for slot / attendance mismatches, we should be able to perform sanity checks related to customer's bookings. The check should check for discrepancies between slot documents and
bookedSlots
documents in every customer'sbookings
collection. It should produce a result containing data:id
,date
and customer info (perhapsid
andsecretKey
)The check should write the result to
sanityChecks/<organization>/slotBookings/<timestamp>
Notes
SanityCheckKind
, etc...)