partition by org_id and add auth
All checks were successful
Build and Publish / build-release (push) Successful in 3m7s

This commit is contained in:
2026-05-15 10:08:54 -05:00
parent a0b5e0c0b3
commit 4519f797fd
26 changed files with 687 additions and 112 deletions

View File

@@ -4,6 +4,8 @@ defmodule CustomerService.Projections.Customer do
@derive {Jason.Encoder,
only: [
:id,
:org_id,
:customer_id,
:customer_type,
# individual
:first_name,
@@ -27,7 +29,7 @@ defmodule CustomerService.Projections.Customer do
@derive {
Flop.Schema,
filterable: [:customer_type, :email, :phone, :document_id, :ruc, :search],
filterable: [:org_id, :customer_type, :email, :phone, :document_id, :ruc, :search],
sortable: [:last_name, :legal_name, :inserted_at],
default_limit: 20,
max_limit: 100,
@@ -40,10 +42,13 @@ defmodule CustomerService.Projections.Customer do
]
}
@primary_key {:id, :binary_id, autogenerate: false}
@primary_key {:id, :string, autogenerate: false}
@timestamps_opts [type: :utc_datetime_usec]
schema "customers" do
field :org_id, :string
field :customer_id, :string
field :customer_type, :string, default: "individual"
# individual fields