How to store booking times effectively?

Options

I am creating somewhat of a calendly alternative and I need people to be able to select the times that they are available for bookings.

However, I am confused, about what type of field type I should use for something like this because the booking availability will have the person's normal weekly hours but then on a week-to-week basis, they should be able to change their availability too.

How should I store this information - would I need to store the date and the time for each of their available times - that seems to be a lot of data that would need to be collected for it, and how would I even go about doing this from my front end (weweb)

Tagged:

Answers

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    I would start with the template in the user table with weekdays and the start and end of availability that will be used to create future weeks in weeks table. In the week table, I would create a concrete week with dates for a particular user based on his template. Another table would be bookings with the relation to specific day and time of that day and the number of minimal time units that fits you, 15m 30m 60m.