Company-Department-Post
Xiao Li is the general manager of company a, the deputy general manager of company b, the director of r&d center of company b, and the manager of a department of public relations center of company b.
A person may hold multiple positions in multiple departments of multiple companies. How can such authority and association be properly set?
Functional departments and positions do not set up natural relationships. For example, if the manager’s power is greater than the deputy’s, this assumption is not set up.
Set the permission table separately. This is a parallel structure and does not set the up-down level relationship between permissions. Can be grouped
Set up permission group table or role table, only keep basic information.
Setting Association between Permission Groups or Role Information and Permissions-What kind of parallel permissions does a user group have
Staff table
Company department table, tree structure
Company Job Table, Tree Structure
The 1-to-many relationship between company positions and permission groups, that is, the default permission group for a position, can be associated with multiple
Employees are associated with departments and positions, multiple positions, multiple functions,
The relationship between employees and permission groups, that is, an employee can have permissions other than those of his position, can consider setting a validity period.
At this point, starting from an employee, one can know which department he works for, what position he holds, and what permissions he has-the union of the permission sets corresponding to the position he holds.