I’m setting up with class with availability dates and times. So if there is a date and time that the user is unavailable, it won’t be possible to make an appointment during that period.
The user should be able to set specific dates and times he won’t be available, on times he had previously set to be available. For example, let say he’s available every Monday from 8am-5pm, but there is this specific Monday he won’t be, so he enters that specific date and it has precedence over the Availability. So for that I setup the following table:
Unavailability table with the following fields
[LIST]
[]id int not null auto_increment primary key
[]userid int not null
[]UnavailableStartDateTime datetime not null
[]UnavailableEndDateTime datetime not null
[/LIST]
The user should be able to set normal schedules available dates and times. The user should be able to set something like
Available Every Monday from 8am - 5pm
Available Every Tuesday from 9am - 6pm
Available Every Wednesday from 8am - 12pm
So I setup the the Availability table with the following fields
[LIST]id int not null auto_increment primary key
[]userid int not null
[]AvailableDay text (to enter Monday or Tuesday)
[]AvailableTimeStart time
[]AvailableTimeEnd time
[/LIST]
Any suggestions?