✅ Purpose
Defines a master → employee relationship for access control in Admin.
🧩 Fields
master— FK to Useremployee— FK to User
Constraint: (master, employee) is unique.
🧠 Methods
-
get_employees(user, with_master=False)- returns employee list for a master
- optionally includes the master
-
get_master(user)- returns master for the given employee or
None
- returns master for the given employee or