I'm building an app that can rent a tool station at a given time per a given date.
I have a reservation table and a capacity rules table.
Reservation table/model contains all of the reservations per date and time and my capacity rules define on which dates some booking rules apply. For example some tool station is not available on some dates, or my schedule is different for some date range.
Now, my question is, how to build an efficient availability system?
I want to build a set of classes that handle, check and fetch the availability of the tool stations.
For example when the user selects 12.01.2023. 12:00 I want to check if I have some tool stations available, at what location. If not I want to find some time/dates around.
My idea is to build an AvailabilityManager Service that controls and checks availability. Also some helper classes of ToolStationAvailability that will be returned with attributes like isAvailable.