This commit is contained in:
@@ -13,7 +13,7 @@ defmodule CustomerService.Projectors.Customer do
|
||||
%CustomerService.Aggregates.CustomerId{org_id: org_id, customer_id: customer_id} = event.id
|
||||
|
||||
Ecto.Multi.insert(multi, :customer, %Customer{
|
||||
id: CustomerId.to_string(event.id),
|
||||
id: to_string(event.id),
|
||||
org_id: org_id,
|
||||
customer_id: customer_id,
|
||||
customer_type: "individual",
|
||||
@@ -42,7 +42,7 @@ defmodule CustomerService.Projectors.Customer do
|
||||
%CustomerService.Aggregates.CustomerId{org_id: org_id, customer_id: customer_id} = e.id
|
||||
|
||||
Ecto.Multi.insert(multi, :customer, %Customer{
|
||||
id: CustomerId.to_string(e.id),
|
||||
id: to_string(e.id),
|
||||
org_id: org_id,
|
||||
customer_id: customer_id,
|
||||
customer_type: "corporate",
|
||||
@@ -58,7 +58,7 @@ defmodule CustomerService.Projectors.Customer do
|
||||
end)
|
||||
|
||||
project(%Events.CustomerUpdated{} = e, _meta, fn multi ->
|
||||
composite_id = CustomerId.to_string(e.id)
|
||||
composite_id = to_string(e.id)
|
||||
|
||||
Ecto.Multi.update_all(multi, :customer, from(c in Customer, where: c.id == ^composite_id),
|
||||
set: [
|
||||
@@ -75,7 +75,7 @@ defmodule CustomerService.Projectors.Customer do
|
||||
end)
|
||||
|
||||
project(%Events.CorporateCustomerUpdated{} = e, _meta, fn multi ->
|
||||
composite_id = CustomerId.to_string(e.id)
|
||||
composite_id = to_string(e.id)
|
||||
|
||||
Ecto.Multi.update_all(multi, :customer, from(c in Customer, where: c.id == ^composite_id),
|
||||
set: [
|
||||
|
||||
Reference in New Issue
Block a user