I have a discussion with a partner, we have this scenario:
**Publishers root entity
Advertiser root entity**
Each of these objects has common information:
Email, BillingAddress, NormalAddress, Gender, SSN, etc.
I decided: A Person object with a Value object. Address and other properties. Thus, if I want to access specific information about a Person (email, sex, dateofbird), I do not need to go through the root objects of the publisher or advertiser to receive it (treat the Face as a common root).
Sample: **Person.BillingAddress.Address1 :
Person.BillingAddress.Address2 :
Person.BillingAddress.POBOX :
Person.Email :
Person.Sex**
My teammate suggests doing this using an abstract class, the advertiser and publisher inherits from the abstract class Person to have all the common properties.
What is the best way to do this? If you have, please guide us.
Thank you Pedro de la Cruz