StrawHat.Map v0.3.0 StrawHat.Map.Schema.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 oft:StrawHat.Map.Schema.States.t/0
associated with the country
Functions
Validate 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.Schema.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.Schema.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 oft:StrawHat.Map.Schema.States.t/0
associated 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()
Validate the attributes and return a Ecto.Changeset for the current Country.