StrawHat.Map v2.0.0 StrawHat.Map.Country View Source

A Country entity.

Link to this section Summary

Types

t()
  • iso_two: Two characters ISO code.
  • iso_three: Three characters ISO code.
  • iso_numeric: Numeric ISO code.
  • continent: Two characters continent code.
  • postal_code_rule: A regular expression for validating postal codes

Link to this section Types

Link to this type

country_attrs() View Source
country_attrs() :: %{
  name: String.t(),
  iso_two: String.t(),
  iso_three: String.t(),
  iso_numeric: String.t(),
  continent: String.t(),
  has_counties: boolean(),
  postal_code_rule: StrawHat.Map.Ecto.Types.Regex.t()
}

Link to this type

t() View Source
t() :: %StrawHat.Map.Country{
  __meta__: term(),
  continent: String.t(),
  has_counties: boolean(),
  id: String.t(),
  inserted_at: DateTime.t(),
  iso_numeric: String.t(),
  iso_three: String.t(),
  iso_two: String.t(),
  name: String.t(),
  postal_code_rule: StrawHat.Map.Ecto.Types.Regex.t(),
  states: Schema.has_many(StrawHat.Map.State.t()),
  updated_at: DateTime.t()
}

  • iso_two: Two characters ISO code.
  • iso_three: Three characters ISO code.
  • iso_numeric: Numeric ISO code.
  • continent: Two characters continent code.
  • postal_code_rule: A regular expression for validating postal codes.

Link to this section Functions

Link to this function

changeset(country, country_attrs) View Source
changeset(t(), country_attrs()) :: Ecto.Changeset.t()