init commit
Some checks failed
Build and Publish / build-release (push) Failing after 1s

This commit is contained in:
2026-04-15 16:20:22 -05:00
parent 072dbf6e66
commit b1b1c21e4e
28 changed files with 822 additions and 194 deletions

View File

@@ -6,7 +6,9 @@ defmodule CustomerService.Aggregates.Customer do
:birth_date,
:gender,
:email,
:phone
:phone,
:address,
:document_id
]
alias __MODULE__
@@ -24,13 +26,15 @@ defmodule CustomerService.Aggregates.Customer do
birth_date: cmd.birth_date,
gender: cmd.gender,
email: cmd.email,
phone: cmd.phone
phone: cmd.phone,
document_id: cmd.document_id,
address: cmd.address
}
end
@impl Aggregate
def apply(%Customer{} = c, %Events.CustomerCreated{} = e) do
%Customer{
%__MODULE__{
c
| id: e.id,
first_name: e.first_name,
@@ -38,7 +42,9 @@ defmodule CustomerService.Aggregates.Customer do
birth_date: e.birth_date,
gender: e.gender,
email: e.email,
phone: e.phone
phone: e.phone,
address: e.address,
document_id: e.document_id
}
end
end