module Vhcs
  class PbOrgUnit < VhcsRecord

    self.table_name = 'PBOrgUnit'

    alias_attribute :pb_entity_key, :PBEntityKey
    alias_attribute :web_site, :WebSite
    alias_attribute :federal_tax_id, :FederalTaxID
    alias_attribute :duns_number, :DunsNumber
    alias_attribute :company_number, :CompanyNumber
    alias_attribute :company_location, :CompanyLocation
    alias_attribute :division, :Division
    alias_attribute :policy_number, :PolicyNumber
    alias_attribute :when_last_changed, :WhenLastChanged
    alias_attribute :who_last_changed, :WhoLastChanged
    alias_attribute :mmsea_employer_size_g_1_1_5, :MMSEAEmployerSize_G115
    alias_attribute :wait_period_delay_type_g_1_0_7, :WaitPeriodDelayType_G107
    alias_attribute :wait_period, :WaitPeriod
    alias_attribute :wait_period_unit_g_1_0_6, :WaitPeriodUnit_G106

    def attributes
      rails_like = {
          pb_entity_key: self.pb_entity_key,
          web_site: self.web_site,
          federal_tax_id: self.federal_tax_id,
          duns_number: self.duns_number,
          company_number: self.company_number,
          company_location: self.company_location,
          division: self.division,
          policy_number: self.policy_number,
          when_last_changed: self.when_last_changed,
          who_last_changed: self.who_last_changed,
          mmsea_employer_size_g_1_1_5: self.mmsea_employer_size_g_1_1_5,
          wait_period_delay_type_g_1_0_7: self.wait_period_delay_type_g_1_0_7,
          wait_period: self.wait_period,
          wait_period_unit_g_1_0_6: self.wait_period_unit_g_1_0_6,
      }
      super.merge(rails_like)
    end


  end
end