Orm 通过在多个表/模型中划分用户来处理角色

Orm 通过在多个表/模型中划分用户来处理角色,orm,relational-database,Orm,Relational Database,我的应用程序有几种不同属性的用户,例如:客户和员工。一个用户可能属于这些角色中的多个。 因此,我决定使用我的数据库的简化示例结构: users (contains the fields applicable to all different kinds of users) id username email customers (contains fields applicable to customer role) id user_id shipping_addres

我的应用程序有几种不同属性的用户,例如:客户和员工。一个用户可能属于这些角色中的多个。 因此,我决定使用我的数据库的简化示例结构:

users (contains the fields applicable to all different kinds of users)
  id
  username
  email

customers (contains fields applicable to customer role)
  id
  user_id
  shipping_address

employees (contains fields applicable to employee role)
  id
  user_id
  salary
问题1:这是处理具有许多不同属性的用户角色的好方法吗? 实际上,我有六个角色,拥有7-20套属性。有些角色甚至不是常规角色,但却具有额外的属性。如果用户决定使用Facebook帐户登录,则Facebook_帐户表适用

问题2:在我的例子中,当使用ORM时,让角色模型客户扩展用户模型是否有意义? 当我获取客户对象时,我真的希望所有用户och客户属性都在一起,而不必手动合并它们