Build a planning avalabilities

Hi,
I want to build a planning availabilities per users.
I already have an idea but I don't know if it is the easiest one to
implement.
I already have a user model.
I could create a unavailabilites table with these columns:
id, from, to, user_id

And I have a calendar view where i check for each hours of the day the
unavailabilities. And then I am able to build the unavailabilities
table.

What do you think?
Greg