I want to design an appointment barbershop site. and I'm a newbie to database design. This is my target for design: After registering on the site, a user can can select the hairdresser who wants to dress his hair. (A user can't reserve any time for any hairdresser when he reserves time for any hairdresser.) after schedule shows and select time between empty times that are not reserved. This is the same table that I want!
2023-2-2 to 2023-2-9
Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
---|---|---|---|---|---|---|
9:00 AM | 9:00 AM | 9:00 AM | 9:00 AM | 9:00 AM | 9:00 AM | 9:00 AM |
9:15 AM | 9:15 AM | 9:15 AM | 9:15 AM | 9:15 AM | 9:15 AM | 9:15 AM |
9:30 AM | 9:30 AM | 9:30 AM | 9:30 AM | 9:30 AM | 9:30 AM | 9:30 AM |
9:45 AM | 9:45 AM | 9:45 AM | 9:45 AM | 9:45 AM | 9:45 AM | 9:45 AM |
10:00 AM | 10:00 AM | 10:00 AM | 10:00 AM | 10:00 AM | 10:00 AM | 10:00 AM |
... | ... | ... | ... | ... | ... | ... |
5:15 PM | 5:15 PM | 5:15 PM | 5:15 PM | 5:15 PM | 5:15 PM | 5:15 PM |
5:30 PM | 5:30 PM | 5:30 PM | 5:30 PM | 5:30 PM | 5:30 PM | 5:30 PM |
admin of barbershop can modify interval between time (for example, change interval from 15 minutes to 30 minutes). and perhaps for some special time, for example, on Friday between 3 p.m. and 6 p.m., the user must pay a higher Price despite other days (admin can change this time).
this is my template page for booking
My main question is: How can I handle this schedule?
I want best practices for designing this site; perhaps a barbershop has 2000 users!
I must create fixed table for time in database?
Aucun commentaire:
Enregistrer un commentaire