DB design for employee working hours constraints
Use RFC 5545 RRules and ExRules to represent recurring events (days/times they can't work)

Use pg_rrule to turn recurring events into actual events. Use a materialized view.