Bookings will not be created until a valid form is posted.
The booking view checks if the booking time is available before allowing a submission.
When the booking is created it creates a time slot from the TableAvailability model.
This object has an end time 105 minutes after its start time as that is the limit for reservation periods for the restaurant.
Another booking cannot take place on that table with a TableAvailability object that would overlap with an existing one.
New TableAvailability objects cannot have an end time >= to an existing start time, or a start <= to an end.
Bookings will not be created until a valid form is posted.
The booking view checks if the booking time is available before allowing a submission.
When the booking is created it creates a time slot from the TableAvailability model. This object has an end time 105 minutes after its start time as that is the limit for reservation periods for the restaurant.
Another booking cannot take place on that table with a TableAvailability object that would overlap with an existing one. New TableAvailability objects cannot have an end time >= to an existing start time, or a start <= to an end.