Skip to content

Locations

singularName: locationpluralName: locations

Table holds the data for the run locations / runsites. Used by the run table

Schema

NameTypeDetails
latitudefloat
longitudefloat
runsite_namestring
google_linkstring
waze_linkstring
osm_linkstring
run_directionsrichtext
runsrelationoneToMany → Hareline
aliasstringmust match ^[a-zA-Z0-9-. ()/,]+$
alternative_directionsrelationoneToMany → Alternative Directions
force_creationboolean

Lifecycles

beforeCreate (async)

This lifecycle method is triggered before creating a new location entry. It checks whether there is already a location within approximately 500 meters. If such a location exists and the force_creation flag is not set, an ApplicationError is thrown.

Parameters:

  • event: - Lifecycle event containing the data parameters.

beforeUpdate (async)

This lifecycle method is triggered before updating an existing location entry. It updates the geo-coordinates and navigation links accordingly.

Parameters:

  • event: - Lifecycle event containing the data parameters.

Released under the MIT License.