-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1547 from Vizzuality/develop
5.3.5
- Loading branch information
Showing
45 changed files
with
1,070 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
app/models/api/v3/countries_com_trade_partner_indicator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# == Schema Information | ||
# | ||
# Table name: countries_com_trade_partner_indicators | ||
# | ||
# raw_quantity :float | ||
# quantity :float | ||
# value :float | ||
# commodity_id :integer not null | ||
# year :integer not null | ||
# iso3 :text not null | ||
# iso2 :text not null | ||
# partner_iso3 :text not null | ||
# partner_iso2 :text not null | ||
# commodity_code :text not null | ||
# activity :text not null | ||
# | ||
module Api | ||
module V3 | ||
class CountriesComTradePartnerIndicator < YellowTable | ||
belongs_to :commodity, optional: false | ||
|
||
validates :iso3, presence: true | ||
validates :iso2, presence: true | ||
validates :partner_iso3, presence: true | ||
validates :partner_iso2, presence: true | ||
validates :year, presence: true | ||
validates :commodity_code, presence: true | ||
validates :activity, presence: true | ||
|
||
def self.blue_foreign_keys | ||
[ | ||
{name: :commodity_id, table_class: Api::V3::Commodity} | ||
] | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
app/models/api/v3/readonly/countries_com_trade_partner_aggregated_indicator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# == Schema Information | ||
# | ||
# Table name: countries_com_trade_partner_aggregated_indicators | ||
# | ||
# quantity :float | ||
# value :float | ||
# commodity_id :integer | ||
# year :integer | ||
# iso2 :text | ||
# iso3 :text | ||
# activity :text | ||
# | ||
module Api | ||
module V3 | ||
module Readonly | ||
class CountriesComTradePartnerAggregatedIndicator < Api::Readonly::BaseModel | ||
include Api::V3::Readonly::MaterialisedTable | ||
|
||
self.table_name = 'countries_com_trade_partner_aggregated_indicators' | ||
|
||
INDEXES = [].freeze | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.