class QuoteLeg < Sequel::Model(:'quote legs original') set_primary_key [:'kid - user', :'kid - mult', :'kid - comm', :'kid - date', :'kid - time'] many_to_one :leg_time, :class=>:LegTime, :key=>nil, :dataset=> proc {LegTime.filter(:'trip_number'=> trip_number, :leg_number=> leg_number)} n_to_o :quote, :class=>:Quote, :prefix => "quotes" many_to_one :aircraft, :class=>:Aircraft, :key=> :aircraft_id, :primary_key=> :aircraft_id many_to_one :departure_fbo_comment_value, :class=>:Comment, :key=>nil, :dataset=>proc { Comment.filter( :"kid - date"=>self[:"kid - date"], :"kid - time"=>self[:"kid - time"], :"kid - user"=>self[:"kid - user"], :"kid - mult"=>self[:"kid - mult"], :"kid - comm"=>31) } # must hardcode kid comms for comments many_to_one :arrival_fbo_comment_value, :class=>:Comment, :key=>nil, :dataset=>proc { Comment.filter( :"kid - date"=>self[:"kid - date"], :"kid - time"=>self[:"kid - time"], :"kid - user"=>self[:"kid - user"], :"kid - mult"=>self[:"kid - mult"], :"kid - comm"=>22) } # must hardcode kid comms for comments many_to_one :catering_comment_value, :class=>:Comment, :key=>nil, :dataset=>proc { Comment.filter( :"kid - date"=>self[:"kid - date"], :"kid - time"=>self[:"kid - time"], :"kid - user"=>self[:"kid - user"], :"kid - mult"=>self[:"kid - mult"], :"kid - comm"=>23) } # Code associations code_association :leg_purpose_value, :leg_purpose_code, :purpose code_association :leg_type_value, :leg_type_code, :trip_type code_association :regulation_code, :regulation, :certification #### BEGIN GENERATED SECTION #### column_alias :ac_cost_fixed, :'a/c cost fixed' column_alias :ac_log_ac_hrs, :'a/c log a/c hrs' column_alias :ac_log_acc_cyc_1, :'a/c log acc cyc 1' column_alias :ac_log_acc_cyc_2, :'a/c log acc cyc 2' column_alias :ac_log_acc_hrs_1, :'a/c log acc hrs 1' column_alias :ac_log_acc_hrs_2, :'a/c log acc hrs 2' column_alias :ac_log_eng_acc_cyc1, :'a/c log eng acc cyc1' column_alias :ac_log_eng_acc_cyc2, :'a/c log eng acc cyc2' column_alias :ac_log_eng_acc_cyc3, :'a/c log eng acc cyc3' column_alias :ac_log_eng_acc_cyc4, :'a/c log eng acc cyc4' column_alias :ac_log_eng_acc_hrs1, :'a/c log eng acc hrs1' column_alias :ac_log_eng_acc_hrs2, :'a/c log eng acc hrs2' column_alias :ac_log_eng_acc_hrs3, :'a/c log eng acc hrs3' column_alias :ac_log_eng_acc_hrs4, :'a/c log eng acc hrs4' column_alias :ac_log_eng_cyc_fix1, :'a/c log eng cyc fix1' column_alias :ac_log_eng_cyc_fix2, :'a/c log eng cyc fix2' column_alias :ac_log_eng_cyc_fix3, :'a/c log eng cyc fix3' column_alias :ac_log_eng_cyc_fix4, :'a/c log eng cyc fix4' column_alias :ac_log_eng_cycles_1, :'a/c log eng cycles 1' column_alias :ac_log_eng_cycles_2, :'a/c log eng cycles 2' column_alias :ac_log_eng_cycles_3, :'a/c log eng cycles 3' column_alias :ac_log_eng_cycles_4, :'a/c log eng cycles 4' column_alias :ac_log_eng_hrs_1, :'a/c log eng hrs 1' column_alias :ac_log_eng_hrs_2, :'a/c log eng hrs 2' column_alias :ac_log_eng_hrs_3, :'a/c log eng hrs 3' column_alias :ac_log_eng_hrs_4, :'a/c log eng hrs 4' column_alias :ac_log_eng_hrs_fix1, :'a/c log eng hrs fix1' column_alias :ac_log_eng_hrs_fix2, :'a/c log eng hrs fix2' column_alias :ac_log_eng_hrs_fix3, :'a/c log eng hrs fix3' column_alias :ac_log_eng_hrs_fix4, :'a/c log eng hrs fix4' column_alias :ac_log_eng_starts_1, :'a/c log eng starts 1' column_alias :ac_log_eng_starts_2, :'a/c log eng starts 2' column_alias :ac_log_eng_starts_3, :'a/c log eng starts 3' column_alias :ac_log_eng_starts_4, :'a/c log eng starts 4' column_alias :ac_log_eng_cp_1, :'a/c log eng cp 1' column_alias :ac_log_eng_cp_2, :'a/c log eng cp 2' column_alias :ac_log_eng_cp_3, :'a/c log eng cp 3' column_alias :ac_log_eng_cp_4, :'a/c log eng cp 4' column_alias :ac_log_eng_gp_1, :'a/c log eng gp 1' column_alias :ac_log_eng_gp_2, :'a/c log eng gp 2' column_alias :ac_log_eng_gp_3, :'a/c log eng gp 3' column_alias :ac_log_eng_gp_4, :'a/c log eng gp 4' column_alias :ac_log_eng_ip_1, :'a/c log eng ip 1' column_alias :ac_log_eng_ip_2, :'a/c log eng ip 2' column_alias :ac_log_eng_ip_3, :'a/c log eng ip 3' column_alias :ac_log_eng_ip_4, :'a/c log eng ip 4' column_alias :ac_log_eng_pt_1, :'a/c log eng pt 1' column_alias :ac_log_eng_pt_2, :'a/c log eng pt 2' column_alias :ac_log_eng_pt_3, :'a/c log eng pt 3' column_alias :ac_log_eng_pt_4, :'a/c log eng pt 4' column_alias :ac_log_lifts, :'a/c log lifts' column_alias :ac_log_rev_deploy, :'a/c log rev deploy' column_alias :ac_log_rev_eng_cyc, :'a/c log rev eng cyc' column_alias :actual_nautical_mile, :'actual nautical mile' column_alias :additional_time, :'additional time' column_alias :addl_nm_fixed, :'addl nm fixed' column_alias :addl_nautical_miles, :'addl nautical miles' column_alias :addl_time_fixed, :'addl time fixed' column_alias :addon_cost, :'addon cost' column_alias :aircraft_cost, :'aircraft cost' column_alias :aircraft_id, :'aircraft id' column_alias :aircraft_type_id, :'aircraft type id' column_alias :airline_cost, :'airline cost' column_alias :airline_cost_fixed, :'airline cost fixed' column_alias :altitude, :'altitude' column_alias :altitude_fixed, :'altitude fixed' column_alias :amend_date, :'amend date' column_alias :amend_time, :'amend time' column_alias :amended_by, :'amended by' column_alias :approach_1_qty, :'approach 1 qty' column_alias :approach_1_type, :'approach 1 type' column_alias :approach_2_qty, :'approach 2 qty' column_alias :approach_2_type, :'approach 2 type' column_alias :approval_code, :'approval code' column_alias :arriv_tz_gmt_offset, :'arriv tz gmt offset' column_alias :arriv_time_act_gmt, :'arriv time act gmt' column_alias :arriv_time_act_local, :'arriv time act local' column_alias :arrival, :'arrival' column_alias :arrival_ap_prefix, :'arrival a/p prefix' column_alias :arrival_airport_id, :'arrival airport id' column_alias :arrival_date_local, :'arrival date - local' column_alias :arrival_date_gmt, :'arrival date gmt' column_alias :arrival_iata, :'arrival iata' column_alias :arrival_icao, :'arrival icao' column_alias :arrival_icao_iata_id, :'arrival icao/iata/id' column_alias :arrival_site_desc, :'arrival site desc' column_alias :arrival_time_act_hom, :'arrival time act hom' column_alias :arrival_time_est, :'arrival time est.' column_alias :authorization, :'authorization' column_alias :base, :'base' column_alias :billable, :'billable' column_alias :block_time_actual, :'block time actual' column_alias :cargo_pounds, :'cargo - pounds' column_alias :cargo_actual, :'cargo actual' column_alias :cargo_off_at_arrival, :'cargo off at arrival' column_alias :cargo_on_at_depart, :'cargo on at depart' column_alias :catering_comment, :'catering comment' column_alias :catering_departure, :'catering departure' column_alias :catering_kid_comm, :'catering kid - comm' column_alias :catering_kid_date, :'catering kid - date' column_alias :catering_kid_mult, :'catering kid - mult' column_alias :catering_kid_time, :'catering kid - time' column_alias :catering_kid_user, :'catering kid - user' column_alias :catering_not_req, :'catering not req' column_alias :closed, :'closed' column_alias :company, :'company' column_alias :cost_center, :'cost center' column_alias :crew_hotel_comment, :'crew hotel comment' column_alias :crew_hotel_departure, :'crew hotel departure' column_alias :crew_hotel_not_req, :'crew hotel not req' column_alias :crewhotel_kid_comm, :'crewhotel kid - comm' column_alias :crewhotel_kid_date, :'crewhotel kid - date' column_alias :crewhotel_kid_mult, :'crewhotel kid - mult' column_alias :crewhotel_kid_time, :'crewhotel kid - time' column_alias :crewhotel_kid_user, :'crewhotel kid - user' column_alias :crewline, :'crewline' column_alias :deadhead, :'deadhead' column_alias :delay_1_reason, :'delay 1 reason' column_alias :delay_1_time, :'delay 1 time' column_alias :delay_2_reason, :'delay 2 reason' column_alias :delay_2_time, :'delay 2 time' column_alias :depart_ap_prefix, :'depart a/p prefix' column_alias :depart_airport_id, :'depart airport id' column_alias :depart_date_local, :'depart date - local' column_alias :depart_date_key, :'depart date key' column_alias :depart_icao_iata_id, :'depart icao/iata/id' column_alias :depart_site_desc, :'depart site desc' column_alias :depart_tz_gmt_offset, :'depart tz gmt offset' column_alias :depart_time_act_home, :'depart time act home' column_alias :department, :'department' column_alias :departure_iata, :'departure iata' column_alias :departure_icao, :'departure icao' column_alias :dept_date_act_gmt, :'dept date act gmt' column_alias :dept_date_act_home, :'dept date act home' column_alias :dept_date_act_local, :'dept date act local' column_alias :dept_date_gmt, :'dept date gmt' column_alias :dept_time_act_gmt, :'dept time act gmt' column_alias :dept_time_act_local, :'dept time act local' column_alias :dept_time_est, :'dept time est.' column_alias :division, :'division' column_alias :eft, :'eft' column_alias :eft_fixed, :'eft fixed' column_alias :egt, :'egt' column_alias :egt_fixed, :'egt fixed' column_alias :eta_gmt, :'eta - gmt' column_alias :eta_local, :'eta - local' column_alias :eta_fixed, :'eta fixed' column_alias :eta_tentative, :'eta tentative' column_alias :etd_gmt, :'etd - gmt' column_alias :etd_local, :'etd - local' column_alias :etd_fixed, :'etd fixed' column_alias :etd_key, :'etd key' column_alias :etd_tentative, :'etd tentative' column_alias :ete, :'ete' column_alias :fbo_comment, :'fbo comment' column_alias :fbo_departure, :'fbo departure' column_alias :fbo_kid_comm, :'fbo kid - comm' column_alias :fbo_kid_date, :'fbo kid - date' column_alias :fbo_kid_mult, :'fbo kid - mult' column_alias :fbo_kid_time, :'fbo kid - time' column_alias :fbo_kid_user, :'fbo kid - user' column_alias :fbo_not_required, :'fbo not required' column_alias :fos_color, :'fos color' column_alias :flight_number, :'flight number' column_alias :flight_time_actual, :'flight time actual' column_alias :flight_time_inst_act, :'flight time inst act' column_alias :flight_time_inst_sim, :'flight time inst sim' column_alias :flight_time_night, :'flight time night' column_alias :flight_time_training, :'flight time training' column_alias :from_non_ap_site, :'from non-ap site' column_alias :fuel_burn, :'fuel burn' column_alias :fuel_burned, :'fuel burned' column_alias :fuel_cost, :'fuel cost' column_alias :fuel_in, :'fuel in' column_alias :fuel_out, :'fuel out' column_alias :fuel_stop_time, :'fuel stop time' column_alias :fueler_comment, :'fueler comment' column_alias :fueler_departure, :'fueler departure' column_alias :fueler_kid_comm, :'fueler kid - comm' column_alias :fueler_kid_date, :'fueler kid - date' column_alias :fueler_kid_mult, :'fueler kid - mult' column_alias :fueler_kid_time, :'fueler kid - time' column_alias :fueler_kid_user, :'fueler kid - user' column_alias :fueler_not_req, :'fueler not req' column_alias :group, :'group' column_alias :hobbs_begin_time, :'hobbs begin time' column_alias :hobbs_end, :'hobbs end' column_alias :home_tz_gmt_offset, :'home tz gmt offset' column_alias :internal_1, :'internal 1' column_alias :internal_10, :'internal 10' column_alias :internal_4, :'internal 4' column_alias :internal_6, :'internal 6' column_alias :internal_8, :'internal 8' column_alias :internal_9, :'internal 9' column_alias :internal0, :'internal0' column_alias :internal001, :'internal001' column_alias :internal002, :'internal002' column_alias :internal003, :'internal003' column_alias :internal01, :'internal01' column_alias :internalleg, :'internalleg' column_alias :international_leg, :'international leg' column_alias :kid_comm, :'kid - comm' column_alias :kid_date, :'kid - date' column_alias :kid_mult, :'kid - mult' column_alias :kid_time, :'kid - time' column_alias :kid_user, :'kid - user' column_alias :land_time_act_gmt, :'land time act gmt' column_alias :land_time_act_home, :'land time act home' column_alias :landing_night, :'landing night' column_alias :landing_qty, :'landing qty' column_alias :landing_time_est, :'landing time est.' column_alias :leg_error, :'leg error' column_alias :leg_no_tax, :'leg no tax' column_alias :leg_number, :'leg number' column_alias :leg_purpose_code, :'leg purpose code' column_alias :leg_rate_code, :'leg rate code' column_alias :leg_state, :'leg state' column_alias :leg_type_code, :'leg type code' column_alias :limo_comment, :'limo comment' column_alias :limo_departure, :'limo departure' column_alias :limo_kid_comm, :'limo kid - comm' column_alias :limo_kid_date, :'limo kid - date' column_alias :limo_kid_mult, :'limo kid - mult' column_alias :limo_kid_time, :'limo kid - time' column_alias :limo_kid_user, :'limo kid - user' column_alias :limo_not_req, :'limo not req' column_alias :locked_by_user_id, :'locked by - user id' column_alias :mics_serv_1_comment, :'mics serv 1 comment' column_alias :misc_1_kid_comm, :'misc 1 kid - comm' column_alias :misc_1_kid_date, :'misc 1 kid - date' column_alias :misc_1_kid_mult, :'misc 1 kid - mult' column_alias :misc_1_kid_time, :'misc 1 kid - time' column_alias :misc_1_kid_user, :'misc 1 kid - user' column_alias :misc_2_kid_comm, :'misc 2 kid - comm' column_alias :misc_2_kid_date, :'misc 2 kid - date' column_alias :misc_2_kid_mult, :'misc 2 kid - mult' column_alias :misc_2_kid_time, :'misc 2 kid - time' column_alias :misc_2_kid_user, :'misc 2 kid - user' column_alias :misc_3_kid_comm, :'misc 3 kid - comm' column_alias :misc_3_kid_date, :'misc 3 kid - date' column_alias :misc_3_kid_mult, :'misc 3 kid - mult' column_alias :misc_3_kid_time, :'misc 3 kid - time' column_alias :misc_3_kid_user, :'misc 3 kid - user' column_alias :misc_4_kid_comm, :'misc 4 kid - comm' column_alias :misc_4_kid_date, :'misc 4 kid - date' column_alias :misc_4_kid_mult, :'misc 4 kid - mult' column_alias :misc_4_kid_time, :'misc 4 kid - time' column_alias :misc_4_kid_user, :'misc 4 kid - user' column_alias :misc_4_ser_not_req, :'misc 4 ser not req' column_alias :misc_ser_1_not_req, :'misc ser 1 not req' column_alias :misc_ser_2_not_req, :'misc ser 2 not req' column_alias :misc_ser_3_not_req, :'misc ser 3 not req' column_alias :misc_serv_1_depart, :'misc serv 1 depart' column_alias :misc_serv_2_comment, :'misc serv 2 comment' column_alias :misc_serv_2_depart, :'misc serv 2 depart' column_alias :misc_serv_3_comment, :'misc serv 3 comment' column_alias :misc_serv_3_depart, :'misc serv 3 depart' column_alias :misc_serv_4_comment, :'misc serv 4 comment' column_alias :misc_serv_4_depart, :'misc serv 4 depart' column_alias :nautical_miles, :'nautical miles' column_alias :never_scheduled, :'never scheduled' column_alias :note, :'note' column_alias :number_of_fuel_stops, :'number of fuel stops' column_alias :open_checklist, :'open checklist' column_alias :pass_actual_fixed, :'pass actual fixed' column_alias :passengers_actual, :'passengers actual' column_alias :pax_boarding, :'pax boarding' column_alias :pax_count, :'pax count' column_alias :pax_deplaning, :'pax deplaning' column_alias :pax_estimated, :'pax estimated' column_alias :pax_hotel_comment, :'pax hotel comment' column_alias :pax_hotel_departure, :'pax hotel departure' column_alias :pax_hotel_kid_comm, :'pax hotel kid - comm' column_alias :pax_hotel_kid_date, :'pax hotel kid - date' column_alias :pax_hotel_kid_mult, :'pax hotel kid - mult' column_alias :pax_hotel_kid_time, :'pax hotel kid - time' column_alias :pax_hotel_kid_user, :'pax hotel kid - user' column_alias :pax_hotel_not_req, :'pax hotel not req' column_alias :pax_standby_count, :'pax standby count' column_alias :planner, :'planner' column_alias :planner_fax, :'planner fax' column_alias :planner_phone, :'planner phone' column_alias :quote_rate, :'quote rate' column_alias :quotes_kid_comm, :'quotes kid - comm' column_alias :quotes_kid_date, :'quotes kid - date' column_alias :quotes_kid_mult, :'quotes kid - mult' column_alias :quotes_kid_time, :'quotes kid - time' column_alias :quotes_kid_user, :'quotes kid - user' column_alias :ron, :'ron' column_alias :regulation, :'regulation' column_alias :requester, :'requester' column_alias :requester_kid_comm, :'requester kid - comm' column_alias :requester_kid_date, :'requester kid - date' column_alias :requester_kid_mult, :'requester kid - mult' column_alias :requester_kid_time, :'requester kid - time' column_alias :requester_kid_user, :'requester kid - user' column_alias :requester_name_key, :'requester name key' column_alias :restricted, :'restricted' column_alias :scheduled_quote, :'scheduled quote' column_alias :simulator, :'simulator' column_alias :status, :'status' column_alias :statute_miles, :'statute miles' column_alias :tas, :'tas' column_alias :tas_fixed, :'tas fixed' column_alias :tach_begin_time, :'tach begin time' column_alias :tach_end_time, :'tach end time' column_alias :takeof_time_act_home, :'takeof time act home' column_alias :takeoff_night, :'takeoff night' column_alias :takeoff_qty, :'takeoff qty' column_alias :takeoff_time_act_gmt, :'takeoff time act gmt' column_alias :taxi_fixed, :'taxi fixed' column_alias :taxi_time, :'taxi time' column_alias :tech_stop, :'tech stop' column_alias :time_zone_change, :'time zone change' column_alias :to_non_ap_site, :'to non-ap site' column_alias :vor_check, :'vor check' column_alias :verified_by, :'verified by' column_alias :verify_date, :'verify date' column_alias :verify_time, :'verify time' column_alias :wind, :'wind' column_alias :winds_fixed, :'winds fixed' column_alias :column_2, :'column_2' #### END GENERATED SECTION #### end