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