1 # frozen_string_literal: true
3 # == Schema Information
5 # Table name: gpx_tracks
7 # gpx_id :bigint not null, primary key
8 # trackid :integer not null, primary key
9 # segment :integer not null, primary key
10 # geom :st_geometry not null, geometry, 4326
11 # started_at :datetime
16 # index_gpx_tracks_on_geom (geom) USING gist
20 # fk_rails_... (gpx_id => gpx_files.id)
23 class GpxTrack < ApplicationRecord
24 validates :trackid, :segment, :geom, :presence => true
26 belongs_to :trace, :foreign_key => "gpx_id", :inverse_of => :gpx_tracks