Sha256: b7fc440a41c900a62e189a636d35a3e27dfd64d804f79e3a741ea7b52c04d743

Contents?: true

Size: 1.19 KB

Versions: 3

Compression:

Stored size: 1.19 KB

Contents

require 'earth/locality'
# Copyright 2011 Brighter Planet, Inc.
class LodgingProperty < ActiveRecord::Base
  self.primary_key = "northstar_id"
  
  # So Lodging can look up LodgingClass from LodgingProperty
  belongs_to :lodging_class, :foreign_key => 'lodging_class_name'
  
  col :northstar_id
  col :name
  col :city
  col :locality # state / province / etc.
  col :postcode # zip code / postal code / etc.
  col :country_iso_3166_alpha_3_code
  col :chain_name
  col :lodging_rooms,     :type => :integer
  col :floors,            :type => :integer
  col :construction_year, :type => :integer
  col :renovation_year,   :type => :integer
  col :lodging_class_name
  col :restaurants,       :type => :integer
  col :ac_coverage,       :type => :float
  col :mini_bar_coverage, :type => :float
  col :fridge_coverage,   :type => :float
  col :hot_tubs,          :type => :float # float b/c fallback needs to be a float
  col :pools_indoor,      :type => :float # float b/c fallback needs to be a float
  col :pools_outdoor,     :type => :float # float b/c fallback needs to be a float
  col :update_date
  add_index :city
  add_index :locality
  add_index :postcode
  add_index :country_iso_3166_alpha_3_code
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-0.11.16 lib/earth/hospitality/lodging_property.rb
earth-0.11.15 lib/earth/hospitality/lodging_property.rb
earth-0.11.14 lib/earth/hospitality/lodging_property.rb