I have an AR called BankAccount. The serialized event looks like below. Note, that since the AR also are an Entity it has an entityId. In this implementation the aggregateRootId and entityId are the same for the AR. Is it always like this or is it common to have one aggregateRootId like a GUID and another entityId (e.g. incrementing id) even for the AR? I'm thinking that if I need to refactor later and move the AR to another level e.g. want to have a Cutomer as the AR instead how would I go ahead and do that if the BankAccount has the same entityId as the aggregateRootId?
{
"type": "BankAccountCreated",
"event": {
"accountNumber": "0000 123456789",
"aggregateRoot": {
"id": "0217b16f-24d3-3952-b626-2b21b6b1caf0",
"version": 0
},
"entityId": "0217b16f-24d3-3952-b626-2b21b6b1caf0"
}
}