jeudi 25 mars 2021

Database Architecture for booking system with slots and passes

I'm in the process of designing a booking system that allows admins to create bookable entities such as squash courts, tennis courts etc. For this system an admin would create slots for each of those entities and then assign those slots either to a specific day.

The system, however should also be able to book passes such as day passes or weekend passes which would essentially encompass several slots.

Slots Table

Day Start Time End time
1 9:00 10:00
2 9:00 10:00

If for example day 1, which is a Monday has 7 one-hour slots and Tuesday has the same and I want to create a two day pass, how would I set up my database architecture to accomplish this, keeping in mind that other users should still be able to book individual slots and making sure that we can set a maximum limit on how many times the individual slot can be booked?

Aucun commentaire:

Enregistrer un commentaire