I am trying to modelling a Real Estate Organization. The company have branches, each branch has a manager and a number of real estate agent. I am looking at the best way to incorporate the commission and accounting structure into the CRM. Commission from a real estate deal will split between by agent, immediate manager and the company. An accounting code is use for each of the two business of the company: Residential and Industrial real estates. The Branch Manager also has accounting code for each business. Real Estate agent under the branch have multiple accounting codes for each deal. A combination of company code, manager code and agent real estate code are used to account for the commission structure for the agent.
Currently I used the user entity to create the hierarchy of the organization structure: Company, Manager(s) and Agent(s). I am wondering how to capture the information. The code is only a number. Should I create an accounting code entity of different types: CompanyAccountingCode, ManagerAccountingCode, AgentDealAccountingCode:? This will be the only way to capture a collection of codes for user entity even the entity has only one field called accounting code?
Can someone share their experience how to proper design a entity based system?