Locations
singularName: locationpluralName: locations
Table holds the data for the run locations / runsites. Used by the run table
Schema
| Name | Type | Details |
|---|---|---|
| latitude | float | |
| longitude | float | |
| runsite_name | string | |
| google_link | string | |
| waze_link | string | |
| osm_link | string | |
| run_directions | richtext | |
| runs | relation | oneToMany → Hareline |
| alias | string | must match ^[a-zA-Z0-9-. ()/,]+$ |
| alternative_directions | relation | oneToMany → Alternative Directions |
| force_creation | boolean |
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.
