Modeling people / company roles

Ive worked on a project that handles jobs for a home maintenance service, but Im has a difficult time modeling the roles that different people and companies play. If this is important, the system is written using zendFramework, and mySql is written as a data store.

I am doing my best to explain, but I am not very good at data modeling language.
the end user of this system is a maintenance company, which I will call HammerTime in the following examples. This is what I still have:

WorkOrderRequests come from two main sources: Source 1: Resident β†’ requestWorkOrder β†’ PropertyManagementCompany β†’ requestWorkOrder β†’ HammerTime

Source 2: HomeOwner - > requestWorkOrder - > HammerTime

I think of all these objects as clients, but only PropertyManagementCompanies and HomeOwners are β€œdirect” customers who will receive invoices. In addition, a resident can be HomeOwner if they have the property in which they are located. In addition, to add another level of business logic, all Residents relate to Property and all requests from the Resident to the PropertyManagementCompany are notified by the PropertyManager

When WorkOrderRequests enters HammerTime , they are saved as WorkOrders and then handled in several ways.

1: HammerTime β†’ assignWorkOrder β†’

2: HammerTime β†’ contractOutWorkOrder β†’ ServiceVendor

, .

, . , Member, . , PropertyManagementCompany .. p >

, . , Member

, - , - . , .

+3
1

php Zend, Party-Role. ( Google, . (1) (2) (3)).

Person Organization . Employee, ServiceVendor, Resident .. - . : . . ; , .

.

+2

All Articles