fix errors
Some checks failed
Build and Publish / build-release (push) Has been cancelled

This commit is contained in:
2026-05-15 14:12:18 -05:00
parent fbd3bc9772
commit 39527d49a1
4 changed files with 8 additions and 68 deletions

View File

@@ -31,7 +31,7 @@ defmodule CustomerService.Aggregates.CustomerId do
end
defimpl String.Chars do
def to_string(%CustomerService.Aggregates.LeadId{
def to_string(%CustomerService.Aggregates.CustomerId{
org_id: org_id,
customer_type: type,
customer_id: customer_id

View File

@@ -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: [

View File

@@ -13,7 +13,7 @@ defmodule CustomerService.Projectors.QuickLead do
%CustomerService.Aggregates.LeadId{org_id: org_id, lead_id: lead_id} = event.id
Ecto.Multi.insert(multi, :quick_lead, %QuickLead{
id: LeadId.to_string(event.id),
id: to_string(event.id),
org_id: org_id,
lead_id: lead_id,
name: event.name,
@@ -38,7 +38,7 @@ defmodule CustomerService.Projectors.QuickLead do
end)
project(%Events.QuickLeadUpdated{} = event, _meta, fn multi ->
composite_id = LeadId.to_string(event.id)
composite_id = to_string(event.id)
Ecto.Multi.update_all(multi, :quick_lead, from(q in QuickLead, where: q.id == ^composite_id),
set: [
@@ -55,7 +55,7 @@ defmodule CustomerService.Projectors.QuickLead do
end)
project(%Events.LeadStatusUpdated{} = event, _meta, fn multi ->
composite_id = LeadId.to_string(event.id)
composite_id = to_string(event.id)
Ecto.Multi.update_all(multi, :quick_lead, from(q in QuickLead, where: q.id == ^composite_id),
set: [