Let's say that I have two bounded contexts, Billing and Shipping.
In Billing Bounded Context I have this:
class Account {
private $id;
private $address;
private $zipCode;
private $city;
private $postbox;
}
And in the Shipping Bounded Context i have this:
class Recipient {
private $id;
private $address;
private $zipCode;
private $city;
private $doorCode;
}
So now, the 2 models, as we all know relate to another a User in some other bounded context.
Should the Account and Recipient share the same id and this id would come from User Model.
Do I have to add a field in these models called $userId in addition to accountId and recipientId?