Files
TREK/server/src/db/kysely/CollectionTours.table.ts
T
Maurice ae699187f7 fix(tours): open a saved ski tour as saved and keep what its router planned
A saved ski tour now opens with the line, heights, time, build and
planned legs it was saved with, read from the place this device keeps,
and nothing is asked of the piste router until a point, an option or the
discipline changes. Opened offline, while TREK Places is down or with
piste routing switched off, it no longer turns every leg straight, and a
rename saves the planned tour as it was. A kept line whose length is not
the tour's is another save's, and the tour is planned afresh.

- the save names the legs the router planned (ski_planned_legs, checked
  against the tour's own legs); get_tour_plan reports each leg routed or
  drawn from them instead of from the build alone, a tour that names none
  counting as planned only with the router's time
- copies keep ski_options in every path: in the trip, taken over, kept
  in a collection and made from one (collection_tours gets the column in
  the same unshipped migration)
- the route summary shows the data build, the km of runs, the height
  skied down on them and the lift rides, and the credit the server sends
  in place of a fixed one; a tour opened as saved says so
- answers refused while piste routing is off, or planned on an older kept
  copy, are not remembered, so they are asked again later
- terrain heights between known ones are filled in one walk along the line
- i18n: five summary keys in all 27 locales
2026-10-20 21:15:45 +02:00

46 lines
1.9 KiB
TypeScript

// Generated by scripts/generate-db-types.ts from the migrated schema. Do not edit by hand:
// change the migration, then run `npm run gen:db-types`.
import type { InsertOptional } from './columns';
export interface CollectionToursTable {
id: InsertOptional<number>;
collection_id: number;
saved_by: InsertOptional<number | null>;
name: string;
description: InsertOptional<string | null>;
website: InsertOptional<string | null>;
route_geometry: InsertOptional<string | null>;
waypoints: string;
tour_type: string;
distance: InsertOptional<number | null>;
elevation_gain: InsertOptional<number | null>;
elevation_loss: InsertOptional<number | null>;
duration: InsertOptional<number | null>;
planned_duration_minutes: InsertOptional<number | null>;
break_additional_minutes: InsertOptional<number | null>;
difficulty: InsertOptional<string | null>;
wanderer_ref: InsertOptional<string | null>;
match_confidence: InsertOptional<number | null>;
max_hiking_difficulty: InsertOptional<number | null>;
bike_profile: InsertOptional<string | null>;
run_profile: InsertOptional<string | null>;
run_pace_seconds_per_km: InsertOptional<number | null>;
ski_discipline: InsertOptional<string | null>;
ski_technique: InsertOptional<string | null>;
boat_type: InsertOptional<string | null>;
water_context: InsertOptional<string | null>;
paddle_speed_kmh: InsertOptional<number | null>;
portage_speed_kmh: InsertOptional<number | null>;
paddle_lake_style: InsertOptional<string | null>;
track_marks: InsertOptional<string | null>;
hiking_preferences: InsertOptional<string | null>;
origin: string;
origin_file_name: InsertOptional<string | null>;
track_started_at: InsertOptional<string | null>;
track_ended_at: InsertOptional<string | null>;
source_trip_title: string;
source_tour_name: string;
created_at: InsertOptional<string>;
ski_options: InsertOptional<string | null>;
}