StrawHat.Map v1.0.0 StrawHat.Map.Country View Source
Represents a Country Ecto Schema with functionality about the data validation for Country.
Link to this section Summary
Types
Check t/0 type for more information about the keys
name: Name of the country.iso_two: Two characters ISO code.iso_three: Three characters ISO code.iso_numeric: Numeric ISO code.has_counties: Defines if the country has counties.continent: Two characters continent code.states: List ofStrawHat.Map.States.t/0associated with the country
Functions
Validates the attributes and return a Ecto.Changeset for the current Country
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.Country{
__meta__: term(),
continent: String.t(),
has_counties: boolean(),
id: term(),
iso_numeric: String.t(),
iso_three: String.t(),
iso_two: String.t(),
name: String.t(),
states: [StrawHat.Map.State.t()] | Ecto.Association.NotLoaded.t()
}
name: Name of the country.iso_two: Two characters ISO code.iso_three: Three characters ISO code.iso_numeric: Numeric ISO code.has_counties: Defines if the country has counties.continent: Two characters continent code.states: List ofStrawHat.Map.States.t/0associated with the country.
Link to this section Functions
Link to this function
changeset(country, country_attrs)
View Source
changeset(t(), country_attrs()) :: Ecto.Changeset.t()
Validates the attributes and return a Ecto.Changeset for the current Country.