Class: HarmonizationCode
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- HarmonizationCode
- Defined in:
- app/models/harmonization_code.rb
Overview
== Schema Information
Table name: harmonization_codes
Database name: primary
id :bigint not null, primary key
description :string not null
hscode :string not null
level :integer not null
parent :string not null
section :string not null
Indexes
index_harmonization_codes_on_hscode (hscode) UNIQUE
index_harmonization_codes_on_level (level)
index_harmonization_codes_on_parent (parent)
index_harmonization_codes_on_section (section)
Constant Summary
Constants included from Schedulable
Schedulable::SIMPLE_FORM_OPTIONS
Class Method Summary collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Class Method Details
.get_description_from_hscode(hscode) ⇒ Object
22 23 24 |
# File 'app/models/harmonization_code.rb', line 22 def self.get_description_from_hscode(hscode) HarmonizationCode.where(hscode: hscode.delete(".")).first&.description end |