StrawHat.Map v0.3.0 StrawHat.Map.Schema.Location View Source

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

Link to this section Summary

Types

Check t/0 type for more information about the keys

t()

Functions

Validate the attributes and return a Ecto.Changeset for the current Location

Link to this section Types

Link to this type location_attrs() View Source
location_attrs() :: %{location: Map.t(), address_id: String.t()}

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

  • location: the GeoJSON Point structure for the location of the Location.
Link to this type t() View Source
t() :: %StrawHat.Map.Schema.Location{
  __meta__: term(),
  address: StrawHat.Map.Schema.Address.t() | Ecto.Association.NotLoaded.t(),
  address_id: String.t(),
  id: term(),
  location: Geo.Point.t(),
  place: StrawHat.Map.Schema.Place.t() | Ecto.Association.NotLoaded.t()
}

Link to this section Functions

Link to this function changeset(location, location_attrs) View Source
changeset(t(), location_attrs()) :: Ecto.Changeset.t()

Validate the attributes and return a Ecto.Changeset for the current Location.