StrawHat.Map v1.2.1 StrawHat.Map.City View Source
Represents a City Ecto Schema with functionality about the data validation for City.
Link to this section Summary
Types
Check t/0
type for more information about the keys
name
: Name of the city.capital
: Defines the city as capital of the country.state
:StrawHat.Map.State.t/0
associated with the city.state_id
:id
ofStrawHat.Map.State.t/0
associated with the city.county
:StrawHat.Map.County.t/0
associated with the city.county_id
:id
ofStrawHat.Map.County.t/0
associated with the city.addresses
: List ofStrawHat.Map.Address.t/0
associated with the city
Functions
Validates the attributes and return a Ecto.Changeset for the current City
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.City{ __meta__: term(), addresses: [StrawHat.Map.Address.t()], capital: boolean(), county: StrawHat.Map.County.t() | Ecto.Association.NotLoaded.t(), county_id: Integer.t(), id: term(), inserted_at: term(), name: String.t(), state: StrawHat.Map.State.t() | Ecto.Association.NotLoaded.t(), state_id: Integer.t(), updated_at: term() }
name
: Name of the city.capital
: Defines the city as capital of the country.state
:StrawHat.Map.State.t/0
associated with the city.state_id
:id
ofStrawHat.Map.State.t/0
associated with the city.county
:StrawHat.Map.County.t/0
associated with the city.county_id
:id
ofStrawHat.Map.County.t/0
associated with the city.addresses
: List ofStrawHat.Map.Address.t/0
associated with the city.
Link to this section Functions
Link to this function
changeset(city, city_attrs)
View Source
changeset(t(), city_attrs()) :: Ecto.Changeset.t()
Validates the attributes and return a Ecto.Changeset for the current City.