Sha256: 7157d42259e50c1bf2f7c73c927c15678de6e5995b3b519b49f45063b1ab1613

Contents?: true

Size: 1.66 KB

Versions: 36

Compression:

Stored size: 1.66 KB

Contents

################################################################################
#
# This TripLeg is overriding the TripLeg model in fossil that usually would go to fos.
# It is pulling data from the mysql in memory database which is a copy of the fos
# trip leg table but with an added id column, and single ids for all foreign keys,
# so the associations are all rewritten to use the single primary key.
# The other methods are special methods for datamart trip_leg summary table
#
class TripLeg
  one_to_many :crew_legs, :class=>:CrewLeg, :key=>:trip_leg_id, :primary_key=>:id
  one_to_many :flight_log_expenses, :class=>:FlightLogExpense, :key=>:trip_leg_id, :primary_key=>:id
  many_to_one :trip, :class=>:Trip, :key=>:trips_id
  many_to_one :arrival_fbo, :class=>:AirportFbo, :key=>:fbo_id
  many_to_one :departure_fbo, :class=>:AirportFbo, :key=>:fueler_id
  many_to_one :trip_requester, :class=>:Passenger, :key=>:requester_id
  many_to_one :leg_requestor, :class=>:Passenger, :key=>:leg_req_id
  many_to_one :departure_catering_comment,  :class=>:Comment,  :key=>:departure_catering_comment_id
  many_to_one :arrival_catering_comment,    :class=>:Comment,  :key=>:arrival_catering_comment_id
  many_to_one :departure_transport_comment, :class=>:Comment,  :key=>:departure_transport_comment_id
  many_to_one :arrival_transport_comment,   :class=>:Comment,  :key=>:arrival_transport_comment_id
  many_to_one :departure_general_comment,   :class=>:Comment,  :key=>:departure_general_comment_id
  many_to_one :arrival_general_comment,     :class=>:Comment,  :key=>:arrival_general_comment_id
  many_to_one :crew_transport_comment,      :class=>:Comment,  :key=>:crew_transport_comment_id
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fossil-0.5.47 lib/dbr_models/trip_leg.rb
fossil-0.5.46 lib/dbr_models/trip_leg.rb
fossil-0.5.45 lib/dbr_models/trip_leg.rb
fossil-0.5.44 lib/dbr_models/trip_leg.rb
fossil-0.5.43 lib/dbr_models/trip_leg.rb
fossil-0.5.42 lib/dbr_models/trip_leg.rb
fossil-0.5.41 lib/dbr_models/trip_leg.rb
fossil-0.5.40 lib/dbr_models/trip_leg.rb
fossil-0.5.39 lib/dbr_models/trip_leg.rb
fossil-0.5.38 lib/dbr_models/trip_leg.rb
fossil-0.5.37 lib/dbr_models/trip_leg.rb
fossil-0.5.36 lib/dbr_models/trip_leg.rb
fossil-0.5.35 lib/dbr_models/trip_leg.rb
fossil-0.5.34 lib/dbr_models/trip_leg.rb
fossil-0.5.33 lib/dbr_models/trip_leg.rb
fossil-0.5.32 lib/dbr_models/trip_leg.rb
fossil-0.5.31 lib/dbr_models/trip_leg.rb
fossil-0.5.30 lib/dbr_models/trip_leg.rb
fossil-0.5.29 lib/dbr_models/trip_leg.rb
fossil-0.5.28 lib/dbr_models/trip_leg.rb