I have an Addressaddress as part of my domain. AddressThe address keeps information about Countrycountry, Citycity, ZipCodezipcode, Streetstreet and HouseNumberhousenumber. It is used in multiple places - Companya company can have an office Addressaddress, invoicing Addressaddress and/or correspondence Address; Transport has Addresses asaddress; transports have addresses at start, middle and end points; couple of other places, too.
I'm wanderingwondering how to correctly handle this DDD-way. Should Addressaddress be a Value Objectvalue object, an Entity,entity or an Aggregate Rootaggregate root? I've seen similar questions but not surprisingly none of those corresponded well with my domain.
AddressAn address doesn't know how to validate itself - company's Addressesaddresses can be initially almost empty and filled later, but transport's Addressesaddresses should be always complete. So generally it depends on the object containing an Addressaddress, not on the Addressaddress itself.
Next thing is that Addressaddress of one Companycompany is completely independent from Addressesaddresses in other Companiescompanies - event if they are the same in terms of location. Also, changing company's Addressaddress doesn't mean replacing it with another - it is just an update done to the current object. It also doesn't affect other any other Addressaddress. Does that alone qualify Addressaddress as an entity?
As Addressaddress can't function on it's own, it shouldn't be AG, right?
Maybe Addressaddress should be just an interface with CompanyAddress, TransportAddress etc. implementing it? They are following different rules after all...
I'd really appreciate your opinion about this. I feel like I'm missing something here, but can't quite figure out what exactly.