I'm sorry for the title of the topic but I really didn't know how to summarize my problem in a single line
I'm building a website for a company with which the users are going to insert professional appointments. All the data about the appointments will be stored in a database table, so that the users can come back and look at all the information they have entered.
The managers of the company will also have to be able to look at all the information entered by the users, but not by all of them. This is a fast drawing that I've done to show you an example of the hierarchy of the company:
So, for example, User 3 will see data about User 1 and User 2, but not about User 5.
User 5 will see data about User 6, 7, 8, 9 and 10.
User 11 will see data about everyone.
I hope this is pretty clear, I wanted to ask you what's the best way to implement this into a database.