-- available bookings - task 2
-- changes:
--   changed BookingDate (Reserved) data type from date to datetime, because I assumed that Little Lemon
--   allows wants bookings per day and table - a table is considered blocked for 2 hours
-- noqa: disable=CP03,LT02,RF03
create procedure CheckBooking (in Reserved datetime, in TableNumber int, out IsFree boolean) --
begin
    set IsFree = TableIsFree(Reserved, TableNumber);
    select concat("Table ", TableNumber, " is ", if(IsFree, "free", "already booked")) as BookingStatus;
end
