dimanche 31 octobre 2021

How to create a calendar database that shows users availability

Context

I want to build an app where users who belong to a company and a team can add their availability for a given day (available/unavailable) using a calendar. I want to set up a database.

  • The company should be able to access the calendar, teams and users availability and to give a manager status to users.
  • Managers can access the calendar, create teams, add users in their team and set their own availability for a given date
  • Users can set their own availability for a given date

Is this the right way I should imagine my database ? I would like to have more opinions.

Company
  company_id
  calendar_id

User
  user_id
  user_name
  user_status
  company_id
  calendar_id

UserTeam
  user_team_id
  user_id
  team_id

Team
  team_id

Calendar
  calendar_id

Event
  event_id
  event_date
  event_availability
  calendar_id

Aucun commentaire:

Enregistrer un commentaire