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
name
: Name of the state.code
: Code of the state.country
:StrawHat.Map.Country.t/0
associated with the current state.country_id
:id
ofStrawHat.Map.Country.t/0
associated with the state.counties
: List ofStrawHat.Map.County.t/0
associated with the current state.cities
: List ofStrawHat.Map.City.t/0
associated with the current state
Functions
Validates the attributes and return a Ecto.Changeset for the current State
Link to this section Types
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() }
name
: Name of the state.code
: Code of the state.country
:StrawHat.Map.Country.t/0
associated with the current state.country_id
:id
ofStrawHat.Map.Country.t/0
associated with the state.counties
: List ofStrawHat.Map.County.t/0
associated with the current state.cities
: List ofStrawHat.Map.City.t/0
associated with the current state.
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.