StrawHat.Map v0.3.1 StrawHat.Map.Schema.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

Validate 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.Schema.Address{
  __meta__: term(),
  city: StrawHat.Map.Schema.City.t() | Ecto.Association.NotLoaded.t(),
  city_id: Integer.t(),
  id: term(),
  line_one: String.t(),
  line_two: String.t(),
  locations:
    [StrawHat.Map.Schema.Location.t()] | Ecto.Association.NotLoaded.t(),
  postal_code: String.t()
}

Link to this section Functions

Link to this function changeset(address, address_attrs) View Source
changeset(t(), address_attrs()) :: Ecto.Changeset.t()

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