StrawHat.Map v1.2.0 StrawHat.Map.Address View Source

Represents a Address Ecto Schema with functionality about the data validation for Address.

Link to this section Summary

Types

Check t/0 type for more information about the keys

t()

Functions

Validates the attributes and return a Ecto.Changeset for the current Address

Link to this section Types

Link to this type address_attrs() View Source
address_attrs() :: %{
  line_one: String.t(),
  line_two: String.t(),
  postal_code: String.t(),
  city_id: Integer.t()
}

Check t/0 type for more information about the keys.

Link to this type t() View Source
t() :: %StrawHat.Map.Address{
  __meta__: term(),
  city: StrawHat.Map.City.t() | Ecto.Association.NotLoaded.t(),
  city_id: Integer.t(),
  id: term(),
  inserted_at: term(),
  line_one: String.t(),
  line_two: String.t(),
  locations: [StrawHat.Map.Location.t()] | Ecto.Association.NotLoaded.t(),
  postal_code: String.t(),
  updated_at: term()
}

Link to this section Functions

Link to this function changeset(address, address_attrs, opts \\ []) View Source
changeset(t(), address_attrs(), Keyword.t()) :: Ecto.Changeset.t()

Validates the attributes and return a Ecto.Changeset for the current Address.