class Passenger < Sequel::Model(:'passengers') # NOTE - Count of instances as of 06/01/2009 => 24917 # Many to one associations with composite primary keys n_to_o :additional_cost, :class=>:CostGroup, :prefix=>'addlcost' n_to_o :company_authorizer, :class=>:Passenger, :prefix=>'author' n_to_o :host, :class=>:Passenger, :prefix=>'host' n_to_o :checklist_group, :class=>:CheckGroup, :prefix=>'checklist' # One to many associations with composite primary keys o_to_n :planned_trips, :class=>:Trip, :prefix=>'planner' o_to_n :authorized_trips, :class=>:Trip, :prefix=>'author' o_to_n :authorized_trip_legs, :class=>:TripLeg, :prefix=>'author' o_to_n :requested_legs, :class=>:TripLeg, :prefix=>'leg req' o_to_n :planned_trip_legs, :class=>:TripLeg, :prefix=>'planner' o_to_n :requester_for_legs, :class=>:TripLeg, :prefix=>'requester' def gender male_female == 0 ? 'Male' : 'Female' end column_view :birthday, :date #### BEGIN GENERATED SECTION #### set_primary_key [:'kid - user', :'kid - mult', :'kid - comm', :'kid - date', :'kid - time'] column_alias :ar_balance, :'ar balance' column_alias :addlcost_kid_comm, :'addlcost kid - comm' column_alias :addlcost_kid_date, :'addlcost kid - date' column_alias :addlcost_kid_mult, :'addlcost kid - mult' column_alias :addlcost_kid_time, :'addlcost kid - time' column_alias :addlcost_kid_user, :'addlcost kid - user' column_alias :addr_intl, :'addr intl' column_alias :address, :'address' column_alias :address_3, :'address 3' column_alias :airline_ff_1_number, :'airline ff 1 number' column_alias :airline_ff_1_type, :'airline ff 1 type' column_alias :airline_ff_2_number, :'airline ff 2 number' column_alias :airline_ff_2_type, :'airline ff 2 type' column_alias :airline_ff_3_number, :'airline ff 3 number' column_alias :airline_ff_3_type, :'airline ff 3 type' column_alias :airline_ff_4_number, :'airline ff 4 number' column_alias :airline_ff_4_type, :'airline ff 4 type' column_alias :approval, :'approval' column_alias :approval_code, :'approval code' column_alias :apt_suite, :'apt./suite' column_alias :author_kid_comm, :'author kid - comm' column_alias :author_kid_date, :'author kid - date' column_alias :author_kid_mult, :'author kid - mult' column_alias :author_kid_time, :'author kid - time' column_alias :author_kid_user, :'author kid - user' column_alias :authorizer_string, :'authorizer string' column_alias :bag_weight_winter, :'bag weight winter' column_alias :baggage_weight, :'baggage weight' column_alias :base_code, :'base code' column_alias :bill_addr_intl, :'bill addr intl' column_alias :bill_address, :'bill address' column_alias :bill_address_3, :'bill address 3' column_alias :bill_address_4, :'bill address 4' column_alias :bill_address_5, :'bill address 5' column_alias :bill_apt_suite, :'bill apt suite' column_alias :bill_city, :'bill city' column_alias :bill_contact, :'bill contact' column_alias :bill_country, :'bill country' column_alias :bill_department, :'bill department' column_alias :bill_email, :'bill email' column_alias :bill_fax, :'bill fax' column_alias :bill_name, :'bill name' column_alias :bill_name_2, :'bill name 2' column_alias :bill_phone, :'bill phone' column_alias :bill_state, :'bill state' column_alias :bill_zip, :'bill zip' column_alias :birthday, :'birthday' column_alias :birthplace, :'birthplace' column_alias :birthplace_city, :'birthplace city' column_alias :birthplace_state, :'birthplace state' column_alias :building, :'building' column_alias :crm, :'crm' column_alias :car_rent_1_number, :'car rent 1 number' column_alias :car_rent_1_type, :'car rent 1 type' column_alias :car_rent_2_number, :'car rent 2 number' column_alias :car_rent_2_type, :'car rent 2 type' column_alias :car_rent_3_number, :'car rent 3 number' column_alias :car_rent_3_type, :'car rent 3 type' column_alias :car_rent_4_number, :'car rent 4 number' column_alias :car_rent_4_type, :'car rent 4 type' column_alias :cater_comment_key, :'cater comment key' column_alias :checklist_kid_comm, :'checklist kid - comm' column_alias :checklist_kid_date, :'checklist kid - date' column_alias :checklist_kid_mult, :'checklist kid - mult' column_alias :checklist_kid_time, :'checklist kid - time' column_alias :checklist_kid_user, :'checklist kid - user' column_alias :city, :'city' column_alias :company, :'company' column_alias :company_code, :'company code' column_alias :contact_commment_key, :'contact commment key' column_alias :cost_center, :'cost center' column_alias :country, :'country' column_alias :country_of_residents, :'country of residents' column_alias :credit_card_1_addres, :'credit card 1 addres' column_alias :credit_card_1_expdat, :'credit card 1 expdat' column_alias :credit_card_1_name, :'credit card 1 name' column_alias :credit_card_1_number, :'credit card 1 number' column_alias :credit_card_1_type, :'credit card 1 type' column_alias :credit_card_1_uin, :'credit card 1 uin' column_alias :credit_card_1_filler, :'credit card 1 filler' column_alias :credit_card_2_addres, :'credit card 2 addres' column_alias :credit_card_2_expdat, :'credit card 2 expdat' column_alias :credit_card_2_name, :'credit card 2 name' column_alias :credit_card_2_number, :'credit card 2 number' column_alias :credit_card_2_type, :'credit card 2 type' column_alias :credit_card_2_uin, :'credit card 2 uin' column_alias :credit_card_2_filler, :'credit card 2 filler' column_alias :credit_card_3_addres, :'credit card 3 addres' column_alias :credit_card_3_expdat, :'credit card 3 expdat' column_alias :credit_card_3_name, :'credit card 3 name' column_alias :credit_card_3_number, :'credit card 3 number' column_alias :credit_card_3_type, :'credit card 3 type' column_alias :credit_card_3_uin, :'credit card 3 uin' column_alias :credit_card_3_filler, :'credit card 3 filler' column_alias :credit_limit, :'credit limit' column_alias :credit_limit_est, :'credit limit est' column_alias :credit_limit_rev, :'credit limit rev' column_alias :crewmember, :'crewmember' column_alias :deceased, :'deceased' column_alias :department_code, :'department code' column_alias :division_code, :'division code' column_alias :driver_issue_date, :'driver issue date' column_alias :driver_issue_place, :'driver issue place' column_alias :driver_lic_exp_date, :'driver lic exp date' column_alias :driver_lic_number, :'driver lic number' column_alias :driver_lic_state, :'driver lic state' column_alias :email_report, :'email report' column_alias :emergency_contact, :'emergency contact' column_alias :emergency_name, :'emergency name' column_alias :emergency_relation, :'emergency relation' column_alias :employee_number, :'employee number' column_alias :entertainment, :'entertainment' column_alias :fbo_comment_key, :'fbo comment key' column_alias :father_name, :'father name' column_alias :federal_number, :'federal number' column_alias :flt_follow, :'flt follow' column_alias :frequent_traveller, :'frequent traveller' column_alias :full_name, :'full name' column_alias :home_addr_intl, :'home addr intl' column_alias :home_address1, :'home address1' column_alias :home_address2, :'home address2' column_alias :home_address3, :'home address3' column_alias :home_city, :'home city' column_alias :home_country, :'home country' column_alias :home_email_report, :'home email report' column_alias :home_state, :'home state' column_alias :home_zip, :'home zip' column_alias :home2_address1, :'home2 address1' column_alias :home2_address2, :'home2 address2' column_alias :home2_address3, :'home2 address3' column_alias :home2_cellular, :'home2 cellular' column_alias :home2_city, :'home2 city' column_alias :home2_country, :'home2 country' column_alias :home2_email, :'home2 email' column_alias :home2_email_report, :'home2 email report' column_alias :home2_fax, :'home2 fax' column_alias :home2_pager, :'home2 pager' column_alias :home2_phone, :'home2 phone' column_alias :home2_state, :'home2 state' column_alias :home2_zip, :'home2 zip' column_alias :host_initials, :'host initials' column_alias :host_kid_comm, :'host kid - comm' column_alias :host_kid_date, :'host kid - date' column_alias :host_kid_mult, :'host kid - mult' column_alias :host_kid_time, :'host kid - time' column_alias :host_kid_user, :'host kid - user' column_alias :hotel_card_1_number, :'hotel card 1 number' column_alias :hotel_card_1_type, :'hotel card 1 type' column_alias :hotel_card_2_number, :'hotel card 2 number' column_alias :hotel_card_2_type, :'hotel card 2 type' column_alias :hotel_card_3_number, :'hotel card 3 number' column_alias :hotel_card_3_type, :'hotel card 3 type' column_alias :hotel_card_4_number, :'hotel card 4 number' column_alias :hotel_card_4_type, :'hotel card 4 type' column_alias :hotel_comment_key, :'hotel comment key' column_alias :image_name, :'image name' column_alias :infant_child, :'infant child' column_alias :initials, :'initials' column_alias :inside_office_phone, :'inside office phone' column_alias :internal, :'internal' column_alias :internal_1, :'internal 1' column_alias :internal01, :'internal01' column_alias :internal02, :'internal02' column_alias :internal03, :'internal03' column_alias :internal04, :'internal04' column_alias :internal4, :'internal4' column_alias :internal5, :'internal5' column_alias :internal6, :'internal6' 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 :language, :'language' column_alias :last_flown, :'last flown' column_alias :lead_note, :'lead note' column_alias :lead_pax, :'lead pax' column_alias :lead_source, :'lead source' column_alias :limo_comment_key, :'limo comment key' column_alias :mailstop, :'mailstop' column_alias :male_female, :'male/female' column_alias :married, :'married' column_alias :name, :'name' column_alias :name_sounds_like_key, :'name sounds like key' column_alias :name_key, :'name key' column_alias :nationality, :'nationality' column_alias :nickname, :'nickname' column_alias :no_fly, :'no fly' column_alias :no_fly_cleared, :'no fly cleared' column_alias :not_emp_spouse_dep, :'not emp spouse dep' column_alias :note, :'note' column_alias :overdue_balance, :'overdue balance' column_alias :overflight_permit, :'overflight permit' column_alias :passport, :'passport' column_alias :pax_billable, :'pax billable' column_alias :pax_email, :'pax email' column_alias :pax_group, :'pax group' column_alias :pax_height, :'pax height' column_alias :pax_home_cellular, :'pax home cellular' column_alias :pax_home_email, :'pax home email' column_alias :pax_home_fax, :'pax home fax' column_alias :pax_home_pager, :'pax home pager' column_alias :pax_home_phone, :'pax home phone' column_alias :pax_office_cellular, :'pax office cellular' column_alias :pax_office_fax, :'pax office fax' column_alias :pax_office_phone, :'pax office phone' column_alias :pax_pager, :'pax pager' column_alias :pax_rate_code, :'pax rate code' column_alias :pax_status, :'pax status' column_alias :pax_trip_access, :'pax trip access' column_alias :pax_weight, :'pax weight' column_alias :pax_is_a_requester, :'pax is a requester' column_alias :pax_is_an_authorizer, :'pax is an authorizer' column_alias :payment_code, :'payment code' column_alias :payment_overdue, :'payment overdue' column_alias :payment_terms, :'payment terms' column_alias :person_company, :'person/company' column_alias :personal_rate, :'personal rate' column_alias :pl_cellular, :'pl cellular' column_alias :pl_description, :'pl description' column_alias :pl_email, :'pl email' column_alias :pl_email_report, :'pl email report' column_alias :pl_home_fax, :'pl home fax' column_alias :pl_home_phone, :'pl home phone' column_alias :pl_in_office_phone, :'pl in office phone' column_alias :pl_office_fax, :'pl office fax' column_alias :pl_office_phone, :'pl office phone' column_alias :pl_pager, :'pl pager' column_alias :pl2_cellular, :'pl2 cellular' column_alias :pl2_description, :'pl2 description' column_alias :pl2_email, :'pl2 email' column_alias :pl2_email_report, :'pl2 email report' column_alias :pl2_home_fax, :'pl2 home fax' column_alias :pl2_home_phone, :'pl2 home phone' column_alias :pl2_in_office_phone, :'pl2 in office phone' column_alias :pl2_office_fax, :'pl2 office fax' column_alias :pl2_office_phone, :'pl2 office phone' column_alias :pl2_pager, :'pl2 pager' column_alias :planner_trip_access, :'planner trip access' column_alias :planner2_trip_access, :'planner2 trip access' column_alias :position_code, :'position code' column_alias :priority, :'priority' column_alias :problem, :'problem' column_alias :purpose_code, :'purpose code' column_alias :rate_code, :'rate code' column_alias :rate_percent, :'rate percent' column_alias :reason_code, :'reason code' column_alias :reg, :'reg' column_alias :request_aircraft, :'request aircraft' column_alias :requester_restricted, :'requester restricted' column_alias :requester_string, :'requester string' column_alias :resident_alien, :'resident alien' column_alias :resident_alien_cntry, :'resident alien cntry' column_alias :resident_alien_exp, :'resident alien exp' column_alias :resident_alien_no, :'resident alien no' column_alias :sec, :'sec' column_alias :ssn, :'ssn' column_alias :salutation, :'salutation' column_alias :security, :'security' column_alias :special_comment_key, :'special comment key' column_alias :special_handling, :'special handling' column_alias :specialqualification, :'specialqualification' column_alias :spouse, :'spouse' column_alias :state, :'state' column_alias :state_number, :'state number' column_alias :sup_kid_comm, :'sup kid - comm' column_alias :sup_kid_date, :'sup kid - date' column_alias :sup_kid_mult, :'sup kid - mult' column_alias :sup_kid_time, :'sup kid - time' column_alias :sup_kid_user, :'sup kid - user' column_alias :tax_assist, :'tax assist' column_alias :tax_rate_cargo, :'tax rate cargo' column_alias :tax_rate_intl, :'tax rate intl' column_alias :tax_rate_none, :'tax rate none' column_alias :terms, :'terms' column_alias :text_msg, :'text msg' column_alias :title, :'title' column_alias :travel_planner, :'travel planner' column_alias :travel_planner_2, :'travel planner 2' column_alias :trip_aircraft, :'trip aircraft' column_alias :trip_type, :'trip type' column_alias :user_group_id, :'user group id' column_alias :vip, :'vip' column_alias :vendor_id, :'vendor id' column_alias :web_page, :'web page' column_alias :zip, :'zip' column_alias :internal_6, :'internal 6' column_alias :internal_7, :'internal 7' column_alias :internal_8, :'internal 8' column_alias :key0, :'key0' column_alias :key1, :'key1' column_alias :key10, :'key10' column_alias :key11, :'key11' column_alias :key12, :'key12' column_alias :key13, :'key13' column_alias :key14, :'key14' column_alias :key15, :'key15' column_alias :key16, :'key16' column_alias :key17, :'key17' column_alias :key18, :'key18' column_alias :key2, :'key2' column_alias :key3, :'key3' column_alias :key4, :'key4' column_alias :key5, :'key5' column_alias :key6, :'key6' column_alias :key7, :'key7' column_alias :key8, :'key8' column_alias :key9, :'key9' #### END GENERATED SECTION #### end