WIP
This commit is contained in:
28
lib/customer_service/projections/customer.ex
Normal file
28
lib/customer_service/projections/customer.ex
Normal file
@@ -0,0 +1,28 @@
|
||||
defmodule CustomerService.Projections.Customer do
|
||||
use Ecto.Schema
|
||||
|
||||
@derive {Jason.Encoder,
|
||||
only: [
|
||||
:id,
|
||||
:first_name,
|
||||
:last_name,
|
||||
:birth_date,
|
||||
:gender,
|
||||
:email,
|
||||
:phone,
|
||||
:inserted_at,
|
||||
:updated_at
|
||||
]}
|
||||
@primary_key {:id, :binary_id, autogenerate: false}
|
||||
@timestamps_opts [type: :utc_datetime_usec]
|
||||
schema "customers" do
|
||||
field :first_name, :string
|
||||
field :last_name, :string
|
||||
field :birth_date, :date
|
||||
field :gender, :string
|
||||
field :email, :string
|
||||
field :phone, :string
|
||||
|
||||
timestamps()
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user