search

Home  >  Q&A  >  body text

mysql - OA中的权限一人任多部门的岗位 权限表结构设置

公司-》部门-》岗位

小李是A公司总经理 兼任B公司的副总经理 兼任B公司的研发中心总监 兼任B公司的公关中心 某部门的 经理

一个人可能身兼多个公司的多个部门的的多个岗位,这样的权限和关联怎么设置对合理

大家讲道理大家讲道理2867 days ago963

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 13:25:36

    1. There is no natural relationship between functional departments and positions. For example, the manager must have greater power than the deputy. This assumption is not set

    2. Set the permission table separately. This is a parallel structure and does not set the upper and lower level relationships between permissions. Can be grouped

    3. Set a permission group table or role table, keeping only basic information

    4. Set the relationship between permission groups or role information and permissions - "What kind of parallel permissions does a user group have?

    5. Employee List

    6. Company department table, tree structure

    7. Company position list, tree structure

    8. The one-to-many relationship between company positions and authority groups, that is, the default authority group for a certain position, can be associated with multiple

    9. Employees are associated with departments and positions, multiple positions and multiple functions,

    10. The relationship between employees and permission groups, that is, an employee can have permissions beyond the permissions of his position. You can consider setting a validity period
      At this point, starting from an employee, you can know who he works for Which department, what position is held, what permissions are shared - the union of the permission sets corresponding to the positions held

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 13:25:36

    A user can only belong to one department, but can hold multiple positions at the same time.
    Users, departments, positions or roles, and user groups can all be assignees. Resources are associated with assignees, and priorities are set between various assignees. When there are high-priority assignee permission records, low-priority records are ignored.
    In addition, subordinate departments can inherit the authority of the superior department, but subordinate positions cannot inherit the authority of the superior position. Priority must also be considered for this.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:25:36

    General Manager->Director->Part Manager This is a very typical tree structure

    Position table: id (position id) parent_id (parent id of the position)
    Employee table: id (employee id) job_id (owned position id) 1 to many

    reply
    0
  • Cancelreply