StrawHat.Map v1.2.1 StrawHat.Map.State View Source

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

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 State

Link to this section Types

Link to this type state_attrs() View Source
state_attrs() :: %{name: String.t(), code: String.t(), country_id: String.t()}

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

Link to this type t() View Source
t() :: %StrawHat.Map.State{
  __meta__: term(),
  cities: [StrawHat.Map.City.t()] | Ecto.Association.NotLoaded.t(),
  code: String.t(),
  counties: [StrawHat.Map.County.t()] | Ecto.Association.NotLoaded.t(),
  country: State.t() | Ecto.Association.NotLoaded.t(),
  country_id: String.t(),
  id: term(),
  inserted_at: term(),
  name: String.t(),
  updated_at: term()
}

Link to this section Functions

Link to this function changeset(state, state_attrs) View Source
changeset(t(), state_attrs()) :: Ecto.Changeset.t()

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