caboose-rets 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/caboose_rets/admin_media.js +7 -7
  3. data/app/assets/javascripts/caboose_rets/caboose_rets.js +8 -8
  4. data/app/controllers/caboose_rets/agents_controller.rb +67 -75
  5. data/app/controllers/caboose_rets/offices_controller.rb +4 -4
  6. data/app/controllers/caboose_rets/open_houses_controller.rb +3 -3
  7. data/app/controllers/caboose_rets/properties_controller.rb +160 -0
  8. data/app/controllers/caboose_rets/rets_controller.rb +2 -2
  9. data/app/controllers/caboose_rets/rets_media_controller.rb +13 -13
  10. data/app/controllers/caboose_rets/saved_properties_controller.rb +35 -35
  11. data/app/models/caboose_rets/agent.rb +42 -55
  12. data/app/models/caboose_rets/agent_meta.rb +7 -7
  13. data/app/models/caboose_rets/media.rb +63 -57
  14. data/app/models/caboose_rets/office.rb +35 -21
  15. data/app/models/caboose_rets/open_house.rb +15 -15
  16. data/app/models/caboose_rets/property.rb +203 -0
  17. data/app/models/caboose_rets/rets_importer.rb +193 -233
  18. data/app/models/caboose_rets/rets_importer_bak.rb +77 -77
  19. data/app/models/caboose_rets/rets_importer_old.rb +625 -0
  20. data/app/models/caboose_rets/saved_property.rb +4 -4
  21. data/app/models/caboose_rets/saved_search.rb +36 -33
  22. data/app/models/caboose_rets/schema.rb +324 -855
  23. data/app/models/caboose_rets/schema_past.rb +918 -0
  24. data/app/models/caboose_rets/search_option.rb +6 -6
  25. data/app/views/caboose/blocks/_layout_rets.html.erb +9 -6
  26. data/app/views/caboose/blocks/_rets_agent_listings.html.erb +3 -3
  27. data/app/views/caboose_rets/agents/index.html.erb +23 -40
  28. data/app/views/caboose_rets/media/admin_property_media.html.erb +2 -2
  29. data/app/views/caboose_rets/{residential → properties}/_search_form.html.erb +42 -42
  30. data/app/views/caboose_rets/{residential → properties}/admin_edit.html.erb +7 -7
  31. data/app/views/caboose_rets/{land → properties}/admin_index.html.erb +11 -11
  32. data/app/views/caboose_rets/properties/details.html.erb +127 -0
  33. data/app/views/caboose_rets/{land → properties}/index.html.erb +0 -0
  34. data/app/views/caboose_rets/{residential/residential_not_exists.html.erb → properties/property_not_exists.html.erb} +4 -5
  35. data/app/views/caboose_rets/{residential → properties}/test_form.html.erb +1 -1
  36. data/app/views/caboose_rets/rets/admin_import_form.html.erb +1 -1
  37. data/config/routes.rb +70 -55
  38. data/lib/caboose-rets.rb +1 -1
  39. data/lib/caboose_rets/engine.rb +3 -3
  40. data/lib/caboose_rets/version.rb +1 -1
  41. data/lib/rets/base/core.rb +1 -1
  42. data/lib/rets/base/sax_search.rb +1 -1
  43. data/lib/tasks/caboose_rets.rake +106 -17
  44. metadata +16 -50
  45. data/app/controllers/caboose_rets/commercial_controller.rb +0 -349
  46. data/app/controllers/caboose_rets/land_controller.rb +0 -144
  47. data/app/controllers/caboose_rets/multi_family_controller.rb +0 -107
  48. data/app/controllers/caboose_rets/residential_controller.rb +0 -163
  49. data/app/models/caboose_rets/commercial_property.rb +0 -214
  50. data/app/models/caboose_rets/land_property.rb +0 -144
  51. data/app/models/caboose_rets/multi_family_property.rb +0 -199
  52. data/app/models/caboose_rets/residential_property.rb +0 -236
  53. data/app/views/caboose/blocks/_rets_commercial_details.html.erb +0 -192
  54. data/app/views/caboose/blocks/_rets_commercial_headers.html.erb +0 -17
  55. data/app/views/caboose/blocks/_rets_commercial_index.html.erb +0 -71
  56. data/app/views/caboose/blocks/_rets_commercial_row.html.erb +0 -39
  57. data/app/views/caboose/blocks/_rets_commercial_search_form.html.erb +0 -201
  58. data/app/views/caboose/blocks/_rets_land_details.html.erb +0 -165
  59. data/app/views/caboose/blocks/_rets_land_index.html.erb +0 -63
  60. data/app/views/caboose/blocks/_rets_land_row.html.erb +0 -58
  61. data/app/views/caboose/blocks/_rets_land_search_form.html.erb +0 -194
  62. data/app/views/caboose/blocks/_rets_multifamily_details.html.erb +0 -161
  63. data/app/views/caboose/blocks/_rets_multifamily_index.html.erb +0 -63
  64. data/app/views/caboose/blocks/_rets_multifamily_row.html.erb +0 -56
  65. data/app/views/caboose/blocks/_rets_multifamily_search_form.html.erb +0 -273
  66. data/app/views/caboose/blocks/_rets_openhouse_details.html.erb +0 -12
  67. data/app/views/caboose/blocks/_rets_openhouses_index.html.erb +0 -79
  68. data/app/views/caboose/blocks/_rets_residential_details.html.erb +0 -243
  69. data/app/views/caboose/blocks/_rets_residential_index.html.erb +0 -65
  70. data/app/views/caboose/blocks/_rets_residential_row.html.erb +0 -59
  71. data/app/views/caboose/blocks/_rets_residential_search_form.html.erb +0 -304
  72. data/app/views/caboose_rets/commercial/admin_edit.html.erb +0 -269
  73. data/app/views/caboose_rets/commercial/admin_index.html.erb +0 -51
  74. data/app/views/caboose_rets/commercial/admin_new.html.erb +0 -57
  75. data/app/views/caboose_rets/commercial/details.html.erb +0 -0
  76. data/app/views/caboose_rets/commercial/index.html.erb +0 -87
  77. data/app/views/caboose_rets/land/admin_edit.html.erb +0 -156
  78. data/app/views/caboose_rets/land/details.html.erb +0 -0
  79. data/app/views/caboose_rets/multi_family/admin_edit.html.erb +0 -211
  80. data/app/views/caboose_rets/multi_family/admin_index.html.erb +0 -46
  81. data/app/views/caboose_rets/residential/admin_index.html.erb +0 -46
  82. data/app/views/caboose_rets/residential/details.html.erb +0 -0
  83. data/app/views/caboose_rets/residential/index.html.erb +0 -0
@@ -1,10 +1,10 @@
1
1
 
2
2
  class CabooseRets::SavedProperty < ActiveRecord::Base
3
3
  self.table_name = "rets_saved_properties"
4
- belongs_to :user, :class_name => 'Caboose::User'
5
- attr_accessible :user_id, :mls_acct
6
-
4
+ belongs_to :user, :class_name => 'Caboose::User'
5
+ attr_accessible :user_id, :mls
6
+
7
7
  def property
8
- return CabooseRets.get_property(self.mls_acct)
8
+ return CabooseRets.get_property(self.mls)
9
9
  end
10
10
  end
@@ -33,50 +33,53 @@ class CabooseRets::SavedSearch < ActiveRecord::Base
33
33
 
34
34
  def model
35
35
  case self.property_type
36
- when 'residential' then return CabooseRets::ResidentialProperty
37
- when 'commercial' then return CabooseRets::CommercialProperty
38
- when 'land' then return CabooseRets::LandProperty
39
- when 'multi-family' then return CabooseRets::MultiFamilyProperty
36
+ when 'property' then return CabooseRets::Property
40
37
  end
41
38
  return nil
42
39
  end
43
40
 
44
41
  def search_fields()
45
42
  return {
46
- 'name' => '',
47
- 'current_price_gte' => '',
48
- 'current_price_lte' => '',
49
- 'bedrooms_gte' => '',
50
- 'bedrooms_lte' => '',
51
- 'prop_type' => '',
52
- 'tot_heat_sqft_gte' => '',
53
- 'tot_heat_sqft_lte' => '',
54
- 'neighborhood' => '',
55
- 'elem_school' => '',
56
- 'middle_school' => '',
57
- 'high_school' => '',
58
- 'address' => '',
59
- 'lo_lo_code' => '',
60
- 'remarks_like' => '',
61
- 'waterfront' => '',
62
- 'ftr_lotdesc_like' => '',
63
- 'mls_acct' => '',
64
- 'subdivision' => '',
65
- 'foreclosure_yn' => '',
66
- 'street_name_like' => '',
67
- 'street_num_like' => '',
68
- 'date_created_gte' => '',
69
- 'date_created_lte' => '',
70
- 'date_modified_gte' => '',
71
- 'date_modified_lte' => '',
72
- 'status' => ['active']
73
- }
43
+ 'area' => '',
44
+ 'area_like' => '',
45
+ 'acreage_gte' => '',
46
+ 'acreage_lte' => '',
47
+ 'city' => '',
48
+ 'city_like' => '',
49
+ 'county_or_parish' => '',
50
+ 'county_or_parishy_like' => '',
51
+ 'current_price_gte' => '',
52
+ 'current_price_lte' => '',
53
+ 'bedrooms_gte' => '',
54
+ 'bedrooms_lte' => '',
55
+ 'property_type' => '',
56
+ 'property_subtype' => '',
57
+ 'sqft_total_gte' => '',
58
+ 'sqft_total_gte_lte' => '',
59
+ 'neighborhood' => '',
60
+ 'elementary_school' => '',
61
+ 'middle_school' => '',
62
+ 'high_school' => '',
63
+ 'public_remarks_like' => '',
64
+ 'waterfronts' => '',
65
+ 'waterfronts_not_null' => '',
66
+ 'mls_number' => '',
67
+ 'subdivision' => '',
68
+ 'style' => '',
69
+ 'foreclosure_yn' => '',
70
+ 'address_like' => '',
71
+ 'street_name_like' => '',
72
+ 'street_num_like' => '',
73
+ 'postal_code' => '',
74
+ 'postal_code_like' => '',
75
+ 'status' => 'Active'
76
+ }
74
77
  end
75
78
 
76
79
  def search_options
77
80
  return {
78
81
  'model' => self.model.to_s,
79
- 'sort' => 'current_price ASC, mls_acct',
82
+ 'sort' => 'current_price ASC, mls',
80
83
  'desc' => false,
81
84
  'base_url' => "/#{self.property_type}",
82
85
  'items_per_page' => 10
@@ -1,848 +1,314 @@
1
-
2
1
  class CabooseRets::Schema < Caboose::Utilities::Schema
3
-
4
- def self.removed_columns
2
+
3
+ # Tables (in order) that were renamed in the development of the gem.
4
+ def self.renamed_tables
5
5
  {
6
- CabooseRets::CommercialProperty => [ :virtual_tour ],
7
- CabooseRets::ResidentialProperty => [ :virtual_tour ],
8
- CabooseRets::ResidentialProperty => [ :acreage_temp ]
6
+ :property => :rets_properties
9
7
  }
10
8
  end
11
-
12
- def self.indexes
13
- {
14
- CabooseRets::Media => [:media_id]
15
- }
16
- end
17
-
9
+
18
10
  # The schema of the database
19
11
  # { Model => [[name, data_type, options]] }
20
- def self.schema
12
+ def self.schema
21
13
  {
22
14
  CabooseRets::Agent => [
23
- [ :beeper_phone , :string ],
24
- [ :last_name , :string ],
25
- [ :member_email , :string ],
26
- [ :phone_home_fax , :string ],
27
- [ :car_phone , :string ],
28
- [ :la_code , :string ],
29
- [ :member_page , :string ],
30
- [ :phone_pager , :string ],
31
- [ :date_created , :string ],
32
- [ :lo_code , :string ],
33
- [ :member_status , :string ],
34
- [ :phone_second_home , :string ],
35
- [ :date_modified , :string ],
36
- [ :mail_addr1 , :string ],
37
- [ :nrds_id , :string ],
38
- [ :phone_toll_free , :string ],
39
- [ :defaultemail , :string ],
40
- [ :mail_addr2 , :string ],
41
- [ :office_phone , :string ],
42
- [ :phone_voice_mail , :string ],
43
- [ :fax_phone , :string ],
44
- [ :mail_city , :string ],
45
- [ :other_phone , :string ],
46
- [ :phone_voice_pager , :string ],
47
- [ :first_name , :string ],
48
- [ :mail_state , :string ],
49
- [ :phone_change_date , :string ],
50
- [ :photo_count , :string ],
51
- [ :home_phone , :string ],
52
- [ :mail_zip , :string ],
53
- [ :phone_direct_office , :string ],
54
- [ :photo_date_modified , :string ]
15
+ [ :agent_number , :text ],
16
+ [ :cell_phone , :text ],
17
+ [ :direct_work_phone , :text ],
18
+ [ :email , :text ],
19
+ [ :fax_phone , :text ],
20
+ [ :first_name , :text ],
21
+ [ :full_name , :text ],
22
+ [ :generational_name , :text ],
23
+ [ :last_name , :text ],
24
+ [ :matrix_unique_id , :text ],
25
+ [ :matrix_modified_dt , :text ],
26
+ [ :middle_name , :text ],
27
+ [ :mls , :text ],
28
+ [ :mls_id , :text ],
29
+ [ :office_mui , :text ],
30
+ [ :office_mls_id , :text ],
31
+ [ :office_phone , :text ],
32
+ [ :other_phone , :text ],
33
+ [ :phone_toll_free , :text ],
34
+ [ :phone_voice_mail , :text ],
35
+ [ :photo_count , :text ],
36
+ [ :photo_modification_timestamp , :text ]
55
37
  ],
56
38
  CabooseRets::AgentMeta => [
57
39
  [ :la_code , :string ],
58
- [ :hide , :boolean , { :default => false }],
59
- [ :bio , :text ],
60
- [ :contact_info , :text ],
40
+ [ :hide , :boolean , { :default => false }],
41
+ [ :bio , :text ],
42
+ [ :contact_info , :text ],
61
43
  [ :assistant_to , :string ],
62
44
  [ :designation , :string ],
63
45
  [ :image_location , :string ],
64
46
  [ :image , :attachment ]
65
- ],
66
- CabooseRets::CommercialProperty => [
67
- [ :acreage , :text ],
68
- [ :adjoining_land_use , :text ],
69
- [ :agent_notes , :text ],
70
- [ :agent_other_contact_desc , :text ],
71
- [ :agent_other_contact_phone , :text ],
72
- [ :annual_taxes , :text ],
73
- [ :approx_age , :text ],
74
- [ :area , :text ],
75
- [ :banner , :text ],
76
- [ :baths , :text ],
77
- [ :baths_full , :text ],
78
- [ :baths_half , :text ],
79
- [ :bedrooms , :text ],
80
- [ :bom_date , :text ],
81
- [ :book_number , :text ],
82
- [ :book_page , :text ],
83
- [ :book_type , :text ],
84
- [ :box_on_unit , :text ],
85
- [ :box_on_unit_yn , :text ],
86
- [ :business_included_yn , :text ],
87
- [ :buyer_broker , :text ],
88
- [ :buyer_broker_type , :text ],
89
- [ :buyer_city , :text ],
90
- [ :buyer_name , :text ],
91
- [ :buyer_state , :text ],
92
- [ :buyer_zip , :text ],
93
- [ :category , :text ],
94
- [ :city , :text ],
95
- [ :city_code , :text ],
96
- [ :co_la_code , :text ],
97
- [ :co_lo_code , :text ],
98
- [ :co_sa_code , :text ],
99
- [ :co_so_code , :text ],
100
- [ :contacts , :text ],
101
- [ :contr_broker , :text ],
102
- [ :contr_broker_type , :text ],
103
- [ :county , :text ],
104
- [ :current_price , :integer, { :default => 0 }],
105
- [ :date_created , :text ],
106
- [ :date_leased , :text ],
107
- [ :date_modified , :text ],
108
- [ :df_yn , :text ],
109
- [ :directions , :text ],
110
- [ :display_address_yn , :text ],
111
- [ :dom , :text ],
112
- [ :elem_school , :text ],
113
- [ :expenses_assoc , :text ],
114
- [ :expenses_ins , :text ],
115
- [ :expenses_maint , :text ],
116
- [ :expenses_mgmt , :text ],
117
- [ :expenses_other , :text ],
118
- [ :expenses_tax , :text ],
119
- [ :expenses_utility , :text ],
120
- [ :expire_date , :text ],
121
- [ :flood_plain , :text ],
122
- [ :ftr_building , :text ],
123
- [ :ftr_building_type , :text ],
124
- [ :ftr_closing , :text ],
125
- [ :ftr_cooling , :text ],
126
- [ :ftr_docs_on_file , :text ],
127
- [ :ftr_exterior , :text ],
128
- [ :ftr_financing , :text ],
129
- [ :ftr_flooring , :text ],
130
- [ :ftr_heating , :text ],
131
- [ :ftr_interior , :text ],
132
- [ :ftr_internet , :text ],
133
- [ :ftr_lease_terms , :text ],
134
- [ :ftr_property_desc , :text ],
135
- [ :ftr_roof , :text ],
136
- [ :ftr_sale_terms , :text ],
137
- [ :ftr_sewer , :text ],
138
- [ :ftr_showing , :text ],
139
- [ :ftr_sprinkler , :text ],
140
- [ :ftr_style , :text ],
141
- [ :ftr_utilities , :text ],
142
- [ :ftr_utilities_rental , :text ],
143
- [ :ftr_water , :text ],
144
- [ :geo_precision , :text ],
145
- [ :georesult , :text ],
146
- [ :high_school , :text ],
147
- [ :hoa_fee , :text ],
148
- [ :hoa_fee_yn , :text ],
149
- [ :hoa_term , :text ],
150
- [ :income_gross , :text ],
151
- [ :income_net , :text ],
152
- [ :income_other , :text ],
153
- [ :income_rental , :text ],
154
- [ :internet_yn , :text ],
155
- [ :la_code , :text ],
156
- [ :leased_through , :text ],
157
- [ :legal_block , :text ],
158
- [ :legal_lot , :text ],
159
- [ :legals , :text ],
160
- [ :list_date , :text ],
161
- [ :list_price , :text ],
162
- [ :listing_type , :text ],
163
- [ :lo_code , :text ],
164
- [ :lockbox_yn , :text ],
165
- [ :lot_dimensions , :text ],
166
- [ :lot_dimensions_source , :text ],
167
- [ :media_flag , :text ],
168
- [ :middle_school , :text ],
169
- [ :mls_acct , :text ],
170
- [ :municipality , :text ],
171
- [ :negotiable_price , :boolean ],
172
- [ :num_units , :text ],
173
- [ :num_units_occupied , :text ],
174
- [ :off_mkt_date , :text ],
175
- [ :off_mkt_days , :text ],
176
- [ :office_notes , :text ],
177
- [ :orig_lp , :text ],
178
- [ :other_fee , :text ],
179
- [ :other_fee_type , :text ],
180
- [ :owner_name , :text ],
181
- [ :owner_phone , :text ],
182
- [ :parcel_id , :text ],
183
- [ :pending_date , :text ],
184
- [ :photo_count , :text ],
185
- [ :photo_date_modified , :text ],
186
- [ :photo_description , :text ],
187
- [ :photo_instr , :text ],
188
- [ :posession , :text ],
189
- [ :price_change_date , :text ],
190
- [ :price_sqft , :text ],
191
- [ :proj_close_date , :text ],
192
- [ :prop_desc , :text ],
193
- [ :prop_id , :text ],
194
- [ :prop_type , :text ],
195
- [ :remarks , :text ],
196
- [ :road_frontage_ft , :text ],
197
- [ :sa_code , :text ],
198
- [ :sale_lease , :text ],
199
- [ :sale_notes , :text ],
200
- [ :so_code , :text ],
201
- [ :sold_date , :text ],
202
- [ :sold_price , :text ],
203
- [ :sold_terms , :text ],
204
- [ :sqft_source , :text ],
205
- [ :state , :text ],
206
- [ :status , :text ],
207
- [ :status_date , :text ],
208
- [ :status_flag , :text ],
209
- [ :street , :text ],
210
- [ :street_dir , :text ],
211
- [ :street_name , :text ],
212
- [ :street_num , :text ],
213
- [ :sub_agent , :text ],
214
- [ :sub_agent_type , :text ],
215
- [ :sub_area , :text ],
216
- [ :subdivision , :text ],
217
- [ :take_photo_yn , :text ],
218
- [ :third_party_comm_yn , :text ],
219
- [ :tot_heat_sqft , :text ],
220
- [ :tour_date , :text ],
221
- [ :tour_submit_date , :text ],
222
- [ :type_detailed , :text ],
223
- [ :u1_dims , :text ],
224
- [ :u1_free_standing_yn , :text ],
225
- [ :u1_sqft_manuf , :text ],
226
- [ :u1_sqft_office , :text ],
227
- [ :u1_sqft_retail , :text ],
228
- [ :u1_sqft_total , :text ],
229
- [ :u1_sqft_warehouse , :text ],
230
- [ :u1_year_built , :text ],
231
- [ :u2_dims , :text ],
232
- [ :u2_free_standing_yn , :text ],
233
- [ :u2_sqft_manuf , :text ],
234
- [ :u2_sqft_office , :text ],
235
- [ :u2_sqft_retail , :text ],
236
- [ :u2_sqft_total , :text ],
237
- [ :u2_sqft_warehouse , :text ],
238
- [ :u2_year_built , :text ],
239
- [ :u3_dims , :text ],
240
- [ :u3_free_standing_yn , :text ],
241
- [ :u3_sqft_manuf , :text ],
242
- [ :u3_sqft_office , :text ],
243
- [ :u3_sqft_retail , :text ],
244
- [ :u3_sqft_total , :text ],
245
- [ :u3_sqft_warehouse , :text ],
246
- [ :u3_year_built , :text ],
247
- [ :unit_num , :text ],
248
- [ :upload_source , :text ],
249
- [ :vacancy_rate , :text ],
250
- [ :vacant_yn , :text ],
251
- [ :valuation_yn , :text ],
252
- [ :vt_yn , :text ],
253
- [ :waterfront_yn , :text ],
254
- [ :withdrawn_date , :text ],
255
- [ :year_built , :text ],
256
- [ :zip , :text ],
257
- [ :zoning_northport , :text ],
258
- [ :zoning_tusc , :text ],
259
- [ :latitude , :float ],
260
- [ :longitude , :float ]
261
- ],
262
- CabooseRets::LandProperty => [
263
- [ :acreage , :text ],
264
- [ :acreage_source , :text ],
265
- [ :adjoining_land_use , :text ],
266
- [ :agent_notes , :text ],
267
- [ :agent_other_contact_desc , :text ],
268
- [ :agent_other_contact_phone , :text ],
269
- [ :annual_taxes , :text ],
270
- [ :area , :text ],
271
- [ :bom_date , :text ],
272
- [ :book_number , :text ],
273
- [ :book_page , :text ],
274
- [ :book_type , :text ],
275
- [ :buyer_broker , :text ],
276
- [ :buyer_broker_type , :text ],
277
- [ :buyer_name , :text ],
278
- [ :category , :text ],
279
- [ :city , :text ],
280
- [ :city_code , :text ],
281
- [ :co_la_code , :text ],
282
- [ :co_lo_code , :text ],
283
- [ :co_sa_code , :text ],
284
- [ :co_so_code , :text ],
285
- [ :contacts , :text ],
286
- [ :contr_broker , :text ],
287
- [ :contr_broker_type , :text ],
288
- [ :converted , :text ],
289
- [ :county , :text ],
290
- [ :current_price , :integer, { :default => 0 }],
291
- [ :date_created , :text ],
292
- [ :date_modified , :text ],
293
- [ :df_yn , :text ],
294
- [ :directions , :text ],
295
- [ :display_address_yn , :text ],
296
- [ :dom , :text ],
297
- [ :elem_school , :text ],
298
- [ :expire_date , :text ],
299
- [ :ftr_access , :text ],
300
- [ :ftr_docs_on_file , :text ],
301
- [ :ftr_existing_struct , :text ],
302
- [ :ftr_extras , :text ],
303
- [ :ftr_internet , :text ],
304
- [ :ftr_lotdesc , :text ],
305
- [ :ftr_mineralrights , :text ],
306
- [ :ftr_possibleuse , :text ],
307
- [ :ftr_restrictions , :text ],
308
- [ :ftr_sewer , :text ],
309
- [ :ftr_showing , :text ],
310
- [ :ftr_terms , :text ],
311
- [ :ftr_topography , :text ],
312
- [ :ftr_utils , :text ],
313
- [ :ftr_zoning , :text ],
314
- [ :geo_precision , :text ],
315
- [ :georesult , :text ],
316
- [ :high_school , :text ],
317
- [ :internet_yn , :text ],
318
- [ :la_code , :text ],
319
- [ :legal_block , :text ],
320
- [ :legal_lot , :text ],
321
- [ :legal_section , :text ],
322
- [ :legals , :text ],
323
- [ :list_date , :text ],
324
- [ :list_price , :text ],
325
- [ :listing_type , :text ],
326
- [ :lo_code , :text ],
327
- [ :lot_dim_source , :text ],
328
- [ :lot_dimensions , :text ],
329
- [ :media_flag , :text ],
330
- [ :middle_school , :text ],
331
- [ :mls_acct , :text ],
332
- [ :municipality , :text ],
333
- [ :off_mkt_date , :text ],
334
- [ :off_mkt_days , :text ],
335
- [ :office_notes , :text ],
336
- [ :orig_lp , :text ],
337
- [ :orig_price , :text ],
338
- [ :other_fee , :text ],
339
- [ :other_fee_type , :text ],
340
- [ :owner_name , :text ],
341
- [ :owner_phone , :text ],
342
- [ :parcel_id , :text ],
343
- [ :pending_date , :text ],
344
- [ :photo_count , :text ],
345
- [ :photo_date_modified , :text ],
346
- [ :price_change_date , :text ],
347
- [ :price_sqft , :text ],
348
- [ :proj_close_date , :text ],
349
- [ :prop_id , :text ],
350
- [ :prop_type , :text ],
351
- [ :remarks , :text ],
352
- [ :road_frontage_ft , :text ],
353
- [ :sa_code , :text ],
354
- [ :sale_lease , :text ],
355
- [ :sale_notes , :text ],
356
- [ :so_code , :text ],
357
- [ :sold_date , :text ],
358
- [ :sold_price , :text ],
359
- [ :sold_terms , :text ],
360
- [ :state , :text ],
361
- [ :status , :text ],
362
- [ :status_date , :text ],
363
- [ :status_flag , :text ],
364
- [ :street , :text ],
365
- [ :street_dir , :text ],
366
- [ :street_name , :text ],
367
- [ :street_num , :text ],
368
- [ :sub_agent , :text ],
369
- [ :sub_agent_type , :text ],
370
- [ :subdivision , :text ],
371
- [ :third_party_comm_yn , :text ],
372
- [ :unit_num , :text ],
373
- [ :upload_source , :text ],
374
- [ :valuation_yn , :text ],
375
- [ :vt_yn , :text ],
376
- [ :waterfront , :text ],
377
- [ :waterfront_yn , :text ],
378
- [ :wf_feet , :text ],
379
- [ :withdrawn_date , :text ],
380
- [ :zip , :text ],
381
- [ :zoning_northport , :text ],
382
- [ :zoning_tusc , :text ],
383
- [ :latitude , :float ],
384
- [ :longitude , :float ]
385
- ],
386
- CabooseRets::Media => [
387
- [ :date_modified , :string ],
388
- [ :file_name , :string ],
389
- [ :media_id , :string ],
390
- [ :media_order , :integer , { :default => 0 }],
391
- [ :media_remarks , :text ],
392
- [ :media_type , :string ],
393
- [ :mls_acct , :string ],
394
- [ :url , :text ],
395
- [ :image , :attachment ],
396
- [ :file , :attachment ]
397
- ],
398
- CabooseRets::MultiFamilyProperty => [
399
- [ :acreage , :text ],
400
- [ :agent_notes , :text ],
401
- [ :agent_other_contact_desc , :text ],
402
- [ :agent_other_contact_phone , :text ],
403
- [ :annual_taxes , :text ],
404
- [ :area , :text ],
405
- [ :bom_date , :text ],
406
- [ :book_number , :text ],
407
- [ :book_page , :text ],
408
- [ :book_type , :text ],
409
- [ :box_on_unit , :text ],
410
- [ :buyer_broker , :text ],
411
- [ :buyer_broker_type , :text ],
412
- [ :buyer_name , :text ],
413
- [ :category , :text ],
414
- [ :city , :text ],
415
- [ :city_code , :text ],
416
- [ :contacts , :text ],
417
- [ :contr_broker , :text ],
418
- [ :contr_broker_type , :text ],
419
- [ :county , :text ],
420
- [ :co_la_code , :text ],
421
- [ :co_lo_code , :text ],
422
- [ :co_sa_code , :text ],
423
- [ :co_so_code , :text ],
424
- [ :current_price , :integer ],
425
- [ :date_created , :text ],
426
- [ :date_leased , :text ],
427
- [ :date_modified , :text ],
428
- [ :df_yn , :text ],
429
- [ :directions , :text ],
430
- [ :display_address_yn , :text ],
431
- [ :dom , :text ],
432
- [ :elem_school , :text ],
433
- [ :expenses_association , :text ],
434
- [ :expenses_insurance , :text ],
435
- [ :expenses_maintenance , :text ],
436
- [ :expenses_management , :text ],
437
- [ :expenses_other , :text ],
438
- [ :expenses_tax , :text ],
439
- [ :expire_date , :text ],
440
- [ :flood_plain , :text ],
441
- [ :ftr_building_type , :text ],
442
- [ :ftr_construction , :text ],
443
- [ :ftr_cooling , :text ],
444
- [ :ftr_exterior , :text ],
445
- [ :ftr_exterioramenit , :text ],
446
- [ :ftr_floors , :text ],
447
- [ :ftr_heating , :text ],
448
- [ :ftr_interior , :text ],
449
- [ :ftr_rent_incl , :text ],
450
- [ :ftr_roof , :text ],
451
- [ :ftr_roof_age , :text ],
452
- [ :ftr_showing , :text ],
453
- [ :ftr_utils , :text ],
454
- [ :ftr_zoning , :text ],
455
- [ :georesult , :text ],
456
- [ :geo_precision , :text ],
457
- [ :high_school , :text ],
458
- [ :hoa_fee , :text ],
459
- [ :hoa_fee_yn , :text ],
460
- [ :hoa_term , :text ],
461
- [ :income , :text ],
462
- [ :income_other , :text ],
463
- [ :income_rent , :text ],
464
- [ :internet_yn , :text ],
465
- [ :la_code , :text ],
466
- [ :legals , :text ],
467
- [ :limited_service_yn , :text ],
468
- [ :listing_type , :text ],
469
- [ :list_date , :text ],
470
- [ :list_price , :text ],
471
- [ :lot_dimensions , :text ],
472
- [ :lot_dimensions_source , :text ],
473
- [ :lo_code , :text ],
474
- [ :management , :text ],
475
- [ :media_flag , :text ],
476
- [ :middle_school , :text ],
477
- [ :mls_acct , :text ],
478
- [ :municipality , :text ],
479
- [ :num_units , :text ],
480
- [ :num_units_occupied , :text ],
481
- [ :office_notes , :text ],
482
- [ :off_mkt_date , :text ],
483
- [ :off_mkt_days , :text ],
484
- [ :orig_lp , :text ],
485
- [ :orig_price , :text ],
486
- [ :other_fee , :text ],
487
- [ :other_fee_type , :text ],
488
- [ :owner_name , :text ],
489
- [ :owner_phone , :text ],
490
- [ :parcel_id , :text ],
491
- [ :pending_date , :text ],
492
- [ :photo_count , :text ],
493
- [ :photo_date_modified , :text ],
494
- [ :price_change_date , :text ],
495
- [ :price_sqft , :text ],
496
- [ :proj_close_date , :text ],
497
- [ :prop_id , :text ],
498
- [ :prop_type , :text ],
499
- [ :remarks , :text ],
500
- [ :sale_notes , :text ],
501
- [ :sale_rent , :text ],
502
- [ :sa_code , :text ],
503
- [ :sold_date , :text ],
504
- [ :sold_price , :text ],
505
- [ :sold_terms , :text ],
506
- [ :so_code , :text ],
507
- [ :state , :text ],
508
- [ :status , :text ],
509
- [ :status_date , :text ],
510
- [ :status_flag , :text ],
511
- [ :street , :text ],
512
- [ :street_dir , :text ],
513
- [ :street_name , :text ],
514
- [ :street_num , :text ],
515
- [ :subdivision , :text ],
516
- [ :sub_agent , :text ],
517
- [ :sub_agent_type , :text ],
518
- [ :third_party_comm_yn , :text ],
519
- [ :tot_heat_sqft , :text ],
520
- [ :u1_baths , :text ],
521
- [ :u1_num , :text ],
522
- [ :u1_occ , :text ],
523
- [ :u1_rent , :text ],
524
- [ :u1_sqft , :text ],
525
- [ :u1_yn , :text ],
526
- [ :u2_baths , :text ],
527
- [ :u2_num , :text ],
528
- [ :u2_occ , :text ],
529
- [ :u2_rent , :text ],
530
- [ :u2_sqft , :text ],
531
- [ :u2_yn , :text ],
532
- [ :u3_baths , :text ],
533
- [ :u3_num , :text ],
534
- [ :u3_occ , :text ],
535
- [ :u3_rent , :text ],
536
- [ :u3_sqft , :text ],
537
- [ :u3_yn , :text ],
538
- [ :u4_baths , :text ],
539
- [ :u4_num , :text ],
540
- [ :u4_occ , :text ],
541
- [ :u4_rent , :text ],
542
- [ :u4_sqft , :text ],
543
- [ :u4_yn , :text ],
544
- [ :u5_baths , :text ],
545
- [ :u5_num , :text ],
546
- [ :u5_occ , :text ],
547
- [ :u5_rent , :text ],
548
- [ :u5_sqft , :text ],
549
- [ :u5_yn , :text ],
550
- [ :u6_baths , :text ],
551
- [ :u6_num , :text ],
552
- [ :u6_occ , :text ],
553
- [ :u6_rent , :text ],
554
- [ :u6_sqft , :text ],
555
- [ :u6_yn , :text ],
556
- [ :u7_baths , :text ],
557
- [ :u7_num , :text ],
558
- [ :u7_occ , :text ],
559
- [ :u7_rent , :text ],
560
- [ :u7_sqft , :text ],
561
- [ :u7_yn , :text ],
562
- [ :u8_num , :text ],
563
- [ :u8_occ , :text ],
564
- [ :u8_rent , :text ],
565
- [ :u8_sqft , :text ],
566
- [ :u8_yn , :text ],
567
- [ :unit_num , :text ],
568
- [ :upload_source , :text ],
569
- [ :valuation_yn , :text ],
570
- [ :vt_yn , :text ],
571
- [ :withdrawn_date , :text ],
572
- [ :year_built , :text ],
573
- [ :zip , :text ],
574
- [ :latitude , :float ],
575
- [ :longitude , :float ]
576
- ],
47
+ ],
577
48
  CabooseRets::Office => [
578
- [ :lo_date_created , :string ],
579
- [ :lo_date_modified , :string ],
580
- [ :lo_email , :string ],
581
- [ :lo_fax_phone , :string ],
582
- [ :lo_idx_yn , :string ],
583
- [ :lo_code , :string ],
584
- [ :lo_mailaddr1 , :string ],
585
- [ :lo_mailaddr2 , :string ],
586
- [ :lo_mailcity , :string ],
587
- [ :lo_mailstate , :string ],
588
- [ :lo_mailzip , :string ],
589
- [ :lo_main_lo_code , :string ],
590
- [ :lo_name , :string ],
591
- [ :lo_other_phone , :string ],
592
- [ :lo_page , :string ],
593
- [ :lo_phone , :string ],
594
- [ :lo_status , :string ],
595
- [ :photo_count , :string ],
596
- [ :photo_date_modified , :string ]
597
- ],
598
- CabooseRets::OfficeMeta => [
599
- [ :lo_code , :string ],
600
- [ :image , :attachment ]
49
+ [ :lo_addr1 , :text ],
50
+ [ :lo_addr2 , :text ],
51
+ [ :lo_city , :text ],
52
+ [ :lo_email , :text ],
53
+ [ :lo_fax_phone , :text ],
54
+ [ :lo_mail_addr , :text ],
55
+ [ :lo_mail_care_of , :text ],
56
+ [ :lo_mail_city , :text ],
57
+ [ :lo_mail_postal_code , :text ],
58
+ [ :lo_mail_postal_code_plus4 , :text ],
59
+ [ :lo_mail_state_or_province , :text ],
60
+ [ :matrix_unique_id , :text ],
61
+ [ :lo_matrix_modified_dt , :text ],
62
+ [ :lo_mls , :text ],
63
+ [ :lo_mls_id , :text ],
64
+ [ :lo_office_contact_mui , :text ],
65
+ [ :lo_office_contact_mls_id , :text ],
66
+ [ :lo_office_long_name , :text ],
67
+ [ :lo_office_name , :text ],
68
+ [ :lo_phone , :text ],
69
+ [ :lo_photo_count , :text ],
70
+ [ :photo_modification_timestamp , :text ],
71
+ [ :state , :text ],
72
+ [ :street_address , :text ],
73
+ [ :street_city , :text ],
74
+ [ :street_postal_code , :text ],
75
+ [ :street_postal_code_plus4 , :text ],
76
+ [ :street_state_or_province , :text ],
77
+ [ :web_facebook , :text ],
78
+ [ :web_linked_in , :text ],
79
+ [ :web_page_address , :text ],
80
+ [ :web_twitter , :text ],
81
+ [ :zip , :text ]
601
82
  ],
602
83
  CabooseRets::OpenHouse => [
603
- [ :comments , :string ],
604
- [ :date_created , :string ],
605
- [ :date_modified , :string ],
606
- [ :end_time , :string ],
607
- [ :la_code , :string ],
608
- [ :mls_acct , :string ],
609
- [ :open_house_date , :string ],
610
- [ :open_house_type , :string ],
611
- [ :perpetual_yn , :string ],
612
- [ :prop_type , :string ],
613
- [ :start_time , :string ]
84
+ [ :active_yn , :text ],
85
+ [ :description , :text ],
86
+ [ :end_time , :text ],
87
+ [ :entry_order , :text ],
88
+ [ :listing_mui , :text ],
89
+ [ :matrix_unique_id , :text ],
90
+ [ :matrix_modified_dt , :text ],
91
+ [ :open_house_date , :text ],
92
+ [ :open_house_type , :text ],
93
+ [ :provider_key , :text ],
94
+ [ :refreshments , :text ],
95
+ [ :start_time , :text ]
614
96
  ],
615
- CabooseRets::ResidentialProperty => [
616
- [ :bedrooms , :text ],
617
- [ :dom , :text ],
618
- [ :ftr_pool , :text ],
619
- [ :rm_other3_desc , :text ],
620
- [ :baths_full , :text ],
621
- [ :ftr_diningroom , :text ],
622
- [ :ftr_porchpatio , :text ],
623
- [ :rm_other3_name , :text ],
624
- [ :baths_half , :text ],
625
- [ :directions , :text ],
626
- [ :ftr_possession , :text ],
627
- [ :rm_other4 , :text ],
628
- [ :baths , :text ],
629
- [ :display_address_yn , :text ],
630
- [ :current_price , :integer, { :default => 0 }],
631
- [ :rm_other4_desc , :text ],
632
- [ :avm_automated_sales_disabled , :text ],
633
- [ :ftr_drive , :text ],
634
- [ :price_change_date , :text ],
635
- [ :rm_other4_name , :text ],
636
- [ :avm_instant_valuation_disabled , :text ],
637
- [ :elem_school , :text ],
638
- [ :price_sqft , :text ],
639
- [ :rm_recrm , :text ],
640
- #[ :acreage , :text ],
641
- [ :acreage , :float, { :default => 0.0 }],
642
- #[ :acreage_temp , :float, { :default => 0.0 }],
643
- [ :expire_date , :text ],
644
- [ :prop_type , :text ],
645
- [ :rm_recrm_desc , :text ],
646
- [ :ftr_age , :text ],
647
- [ :ftr_exterior , :text ],
648
- [ :rm_bath1 , :text ],
649
- [ :rm_study , :text ],
650
- [ :agent_notes , :text ],
651
- [ :ftr_citycommunit , :text ],
652
- [ :rm_bath1_desc , :text ],
653
- [ :rm_study_desc , :text ],
654
- [ :agent_other_contact_desc , :text ],
655
- [ :ftr_fireplace , :text ],
656
- [ :rm_bath2 , :text ],
657
- [ :rm_sun , :text ],
658
- [ :agent_other_contact_phone , :text ],
659
- [ :flood_plain , :text ],
660
- [ :rm_bath2_desc , :text ],
661
- [ :rm_sun_desc , :text ],
662
- [ :annual_taxes , :text ],
663
- [ :foreclosure_yn , :text ],
664
- [ :rm_bath3 , :text ],
665
- [ :remarks , :text ],
666
- [ :internet_yn , :text ],
667
- [ :georesult , :text ],
668
- [ :rm_bath3_desc , :text ],
669
- [ :right_red_date , :text ],
670
- [ :ftr_appliances , :text ],
671
- [ :ftr_garage , :text ],
672
- [ :rm_br1 , :text ],
673
- [ :ftr_roof , :text ],
674
- [ :tot_heat_sqft , :text ],
675
- [ :geo_precision , :text ],
676
- [ :rm_br1_desc , :text ],
677
- [ :status_flag , :text ],
678
- [ :area , :text ],
679
- [ :ftr_hoaamenities , :text ],
680
- [ :rm_br2 , :text ],
681
- [ :hoa_fee , :text ],
682
- [ :ftr_hoaincludes , :text ],
683
- [ :rm_br2_desc , :text ],
684
- [ :sale_notes , :text ],
685
- [ :hoa_term , :text ],
686
- [ :hoa_fee_yn , :text ],
687
- [ :rm_br3 , :text ],
688
- [ :ftr_terms , :text ],
689
- [ :ftr_attic , :text ],
690
- [ :ftr_heating , :text ],
691
- [ :rm_br3_desc , :text ],
692
- [ :sale_lease , :text ],
693
- [ :ftr_docs_on_file , :text ],
694
- [ :high_school , :text ],
695
- [ :rm_br4 , :text ],
696
- [ :owner_name , :text ],
697
- [ :bom_date , :text ],
698
- [ :homestead_yn , :text ],
699
- [ :rm_br4_desc , :text ],
700
- [ :owner_phone , :text ],
701
- [ :basement_yn , :text ],
702
- [ :ftr_interior , :text ],
703
- [ :rm_br5 , :text ],
704
- [ :sa_code , :text ],
705
- [ :ftr_basement , :text ],
706
- [ :lease_exp_date , :text ],
707
- [ :rm_br5_desc , :text ],
708
- [ :so_code , :text ],
709
- [ :book_number , :text ],
710
- [ :ftr_landscaping , :text ],
711
- [ :rm_brkfst , :text ],
712
- [ :ftr_sewer , :text ],
713
- [ :book_page , :text ],
714
- [ :ftr_laundry , :text ],
715
- [ :rm_brkfst_desc , :text ],
716
- [ :ftr_showing , :text ],
717
- [ :book_type , :text ],
718
- [ :legals , :text ],
719
- [ :rm_den , :text ],
720
- [ :sold_date , :text ],
721
- [ :buyer_name , :text ],
722
- [ :levels , :text ],
723
- [ :rm_den_desc , :text ],
724
- [ :sold_price , :text ],
725
- [ :city_code , :text ],
726
- [ :list_price , :text ],
727
- [ :rm_dining , :text ],
728
- [ :sold_terms , :text ],
729
- [ :converted , :text ],
730
- [ :list_date , :text ],
731
- [ :rm_dining_desc , :text ],
732
- [ :sqft_source , :text ],
733
- [ :currentlease_yn , :text ],
734
- [ :status , :text ],
735
- [ :rm_family , :text ],
736
- [ :state , :text ],
737
- [ :category , :text ],
738
- [ :listing_type , :text ],
739
- [ :rm_family_desc , :text ],
740
- [ :street_dir , :text ],
741
- [ :city , :text ],
742
- [ :la_code , :text ],
743
- [ :rm_foyer , :text ],
744
- [ :street_name , :text ],
745
- [ :co_la_code , :text ],
746
- [ :lo_code , :text ],
747
- [ :rm_foyer_desc , :text ],
748
- [ :street_num , :text ],
749
- [ :co_lo_code , :text ],
750
- [ :ftr_lotdesc , :text ],
751
- [ :rm_great , :text ],
752
- [ :style , :text ],
753
- [ :co_so_code , :text ],
754
- [ :lot_dimensions , :text ],
755
- [ :rm_great_desc , :text ],
756
- [ :subdivision , :text ],
757
- [ :co_sa_code , :text ],
758
- [ :mls_acct , :text ],
759
- [ :rm_kitchen , :text ],
760
- [ :take_photo_yn , :text ],
761
- [ :buyer_broker , :text ],
762
- [ :master_bed_lvl , :text ],
763
- [ :rm_kitchen2 , :text ],
764
- [ :upload_source , :text ],
765
- [ :buyer_broker_type , :text ],
766
- [ :middle_school , :text ],
767
- [ :rm_kitchen2_desc , :text ],
768
- [ :unit_num , :text ],
769
- [ :sub_agent , :text ],
770
- [ :ftr_miscellaneous , :text ],
771
- [ :rm_kitchen_desc , :text ],
772
- [ :valuation_yn , :text ],
773
- [ :sub_agent_type , :text ],
774
- [ :other_fee , :text ],
775
- [ :rm_laundry , :text ],
776
- [ :third_party_comm_yn , :text ],
777
- [ :contr_broker , :text ],
778
- [ :off_mkt_date , :text ],
779
- [ :rm_laundry_desc , :text ],
780
- [ :vt_yn , :text ],
781
- [ :contr_broker_type , :text ],
782
- [ :off_mkt_days , :text ],
783
- [ :rm_living , :text ],
784
- [ :ftr_warrantyprogrm , :text ],
785
- [ :construction_date_comp , :text ],
786
- [ :outlier_yn , :text ],
787
- [ :rm_living_desc , :text ],
788
- [ :wf_feet , :text ],
789
- [ :ftr_construction , :text ],
790
- [ :office_notes , :text ],
791
- [ :rm_lrdr , :text ],
792
- [ :ftr_waterheater , :text ],
793
- [ :construction_status , :text ],
794
- [ :onsite_yn , :text ],
795
- [ :rm_lrdr_desc , :text ],
796
- [ :ftr_watersupply , :text ],
797
- [ :contacts , :text ],
798
- [ :onsite_days_hours , :text ],
799
- [ :rm_master , :text ],
800
- [ :waterfront , :text ],
801
- [ :ftr_cooling , :text ],
802
- [ :orig_lp , :text ],
803
- [ :rm_master_desc , :text ],
804
- [ :ftr_window_treat , :text ],
805
- [ :county , :text ],
806
- [ :other_fee_type , :text ],
807
- [ :rm_other1 , :text ],
808
- [ :ftr_windows , :text ],
809
- [ :df_yn , :text ],
810
- [ :photo_count , :text ],
811
- [ :rm_other1_desc , :text ],
812
- [ :year_built , :text ],
813
- [ :date_modified , :text ],
814
- [ :photo_date_modified , :text ],
815
- [ :rm_other1_name , :text ],
816
- [ :year_built_source , :text ],
817
- [ :status_date , :text ],
818
- [ :prop_id , :text ],
819
- [ :rm_other2 , :text ],
820
- [ :zip , :text ],
821
- [ :date_created , :text ],
822
- [ :parcel_id , :text ],
823
- [ :rm_other2_desc , :text ],
824
- [ :proj_close_date , :text ],
825
- [ :pending_date , :text ],
826
- [ :rm_other2_name , :text ],
827
- [ :withdrawn_date , :text ],
828
- [ :media_flag , :text ],
829
- [ :rm_other3 , :text ],
830
- [ :latitude , :float ],
831
- [ :longitude , :float ]
97
+ CabooseRets::Property => [
98
+ [ :access , :text],
99
+ [ :acreage , :text],
100
+ [ :acreage_source , :text],
101
+ [ :active_open_house_count , :text],
102
+ [ :adjoining_land_use , :text],
103
+ [ :age , :text],
104
+ [ :annual_taxes , :text],
105
+ [ :appliances , :text],
106
+ [ :area , :text],
107
+ [ :attic , :text],
108
+ [ :available_date , :text],
109
+ [ :basement , :text],
110
+ [ :basement_yn , :text],
111
+ [ :baths_full , :text],
112
+ [ :baths_half , :text],
113
+ [ :baths_total , :text],
114
+ [ :beds_total , :text],
115
+ [ :book_number , :text],
116
+ [ :book_page , :text],
117
+ [ :book_type , :text],
118
+ [ :building_type , :text],
119
+ [ :business_included_yn , :text],
120
+ [ :buyer_name , :text],
121
+ [ :city , :text],
122
+ [ :city_community , :text],
123
+ [ :closing , :text],
124
+ [ :co_list_agent_mui , :text],
125
+ [ :co_list_agent_direct_work_phone , :text],
126
+ [ :co_list_agent_full_name , :text],
127
+ [ :co_list_agent_email , :text],
128
+ [ :co_list_agent_mls_id , :text],
129
+ [ :co_list_office_mui , :text],
130
+ [ :co_list_office_mls_id , :text],
131
+ [ :co_list_office_name , :text],
132
+ [ :co_list_office_phone , :text],
133
+ [ :completion_date , :text],
134
+ [ :comp_tenant_rep , :text],
135
+ [ :construction , :text],
136
+ [ :construction_status , :text],
137
+ [ :cooling , :text],
138
+ [ :county_or_parish , :text],
139
+ [ :current_price , :text],
140
+ [ :date_created , :text],
141
+ [ :date_leased , :text],
142
+ [ :date_modified , :text],
143
+ [ :deposit , :text],
144
+ [ :dining_room , :text],
145
+ [ :directions , :text],
146
+ [ :display_address_on_internet_yn , :text],
147
+ [ :dom , :text],
148
+ [ :driveway , :text],
149
+ [ :elementary_school , :text],
150
+ [ :exists_struct , :text],
151
+ [ :expenses_association , :text],
152
+ [ :expenses_insurance , :text],
153
+ [ :expenses_maintenance , :text],
154
+ [ :expenses_management , :text],
155
+ [ :expenses_other , :text],
156
+ [ :expenses_tax , :text],
157
+ [ :expenses_utility , :text],
158
+ [ :exterior_features , :text],
159
+ [ :fireplace , :text],
160
+ [ :flood_plain , :text],
161
+ [ :flooring , :text],
162
+ [ :foreclosure_sale_date , :text],
163
+ [ :foreclosure_yn , :text],
164
+ [ :fsboyn , :text],
165
+ [ :garage , :text],
166
+ [ :heating , :text],
167
+ [ :high_school , :text],
168
+ [ :hoa_amenities , :text],
169
+ [ :hoa_fee , :text],
170
+ [ :hoa_included_in_rent_yn , :text],
171
+ [ :hoa_term , :text],
172
+ [ :hoa_term_mandatory_yn , :text],
173
+ [ :homestead_yn , :text],
174
+ [ :idx_opt_in_yn , :text],
175
+ [ :income_other , :text],
176
+ [ :income_rental , :text],
177
+ [ :interior_features , :text],
178
+ [ :land_features_extras , :text],
179
+ [ :landscaping , :text],
180
+ [ :latitude , :text],
181
+ [ :laundry , :text],
182
+ [ :legal_description , :text],
183
+ [ :legal_lot , :text],
184
+ [ :legal_section , :text],
185
+ [ :levels , :text],
186
+ [ :list_agent_mui , :text],
187
+ [ :list_agent_direct_work_phone , :text],
188
+ [ :list_agent_email , :text],
189
+ [ :list_agent_full_name , :text],
190
+ [ :list_agent_mls_id , :text],
191
+ [ :listing_contract_date , :text],
192
+ [ :list_office_mui , :text],
193
+ [ :list_office_mls_id , :text],
194
+ [ :list_office_name , :text],
195
+ [ :list_office_phone , :text],
196
+ [ :list_price , :text],
197
+ [ :longitude , :text],
198
+ [ :lot_description , :text],
199
+ [ :lot_dimensions , :text],
200
+ [ :lot_dim_source , :text],
201
+ [ :management , :text],
202
+ [ :master_bed_level , :text],
203
+ [ :matrix_unique_id , :text],
204
+ [ :matrix_modified_dt , :text],
205
+ [ :max_sqft , :text],
206
+ [ :middle_school , :text],
207
+ [ :mineral_rights , :text],
208
+ [ :min_sqft , :text],
209
+ [ :misc_indoor_featuresa , :text],
210
+ [ :mls , :text],
211
+ [ :mls_number , :text],
212
+ [ :municipality , :text],
213
+ [ :net_op_inc , :text],
214
+ [ :open_house_count , :text],
215
+ [ :open_house_public_count , :text],
216
+ [ :open_house_public_upcoming , :text],
217
+ [ :open_house_upcoming , :text],
218
+ [ :parcel_number , :text],
219
+ [ :pending_date , :text],
220
+ [ :pets_allowed_yn , :text],
221
+ [ :photo_count , :text],
222
+ [ :photo_modification_timestamp , :text],
223
+ [ :pool , :text],
224
+ [ :porch_patio , :text],
225
+ [ :possession , :text],
226
+ [ :possible_uses , :text],
227
+ [ :postal_code , :text],
228
+ [ :postal_code_plus4 , :text],
229
+ [ :price_per_acre , :text],
230
+ [ :price_sqft , :text],
231
+ [ :property_name , :text],
232
+ [ :property_subtype , :text],
233
+ [ :property_type , :text],
234
+ [ :property_use , :text],
235
+ [ :prop_mgmt_comp , :text],
236
+ [ :public_remarks , :text],
237
+ [ :refrigerator_included_yn , :text],
238
+ [ :rental_rate_type , :text],
239
+ [ :rent_incl , :text],
240
+ [ :res_style , :text],
241
+ [ :restrictions , :text],
242
+ [ :road_frontage , :text],
243
+ [ :roof , :text],
244
+ [ :roofage , :text],
245
+ [ :room_count , :text],
246
+ [ :service_type , :text],
247
+ [ :sewer , :text],
248
+ [ :sold_terms , :text],
249
+ [ :sprinkler , :text],
250
+ [ :sqft_source , :text],
251
+ [ :sqft_total , :text],
252
+ [ :state_or_province , :text],
253
+ [ :status , :text],
254
+ [ :status_contractual_search_date , :text],
255
+ [ :street_dir_prefix , :text],
256
+ [ :street_dir_suffix , :text],
257
+ [ :street_name , :text],
258
+ [ :street_number , :text],
259
+ [ :street_number_numeric , :text],
260
+ [ :street_suffix , :text],
261
+ [ :street_view_param , :text],
262
+ [ :style , :text],
263
+ [ :subdivision , :text],
264
+ [ :topography , :text],
265
+ [ :total_num_units , :text],
266
+ [ :total_num_units_occupied , :text],
267
+ [ :transaction_type , :text],
268
+ [ :unit_count , :text],
269
+ [ :unit_number , :text],
270
+ [ :utilities , :text],
271
+ [ :virtual_tour1 , :text],
272
+ [ :vow_allowed_avmyn , :text],
273
+ [ :vow_allowed_third_party_comm_yn , :text],
274
+ [ :washer_dryer_included , :text],
275
+ [ :water , :text],
276
+ [ :waterfronts , :text],
277
+ [ :waterfront_yn , :text],
278
+ [ :water_heater , :text],
279
+ [ :windows , :text],
280
+ [ :window_treatments , :text],
281
+ [ :year_built , :text],
282
+ [ :yr_blt_source , :text],
283
+ [ :zoning , :text],
284
+ [ :zoning_northport , :text],
285
+ [ :zoning_tusc , :text]
286
+ ],
287
+ CabooseRets::Media => [
288
+ [ :photo_modification_timestamp , :string ],
289
+ [ :file_name , :string ],
290
+ [ :media_mui , :string ],
291
+ [ :media_order , :integer , { :default => 0 }],
292
+ [ :media_remarks , :text ],
293
+ [ :media_type , :text ],
294
+ [ :url , :text ],
295
+ [ :image , :attachment ],
296
+ [ :file , :attachment ],
297
+ [ :media , :bytea ]
832
298
  ],
833
299
  CabooseRets::SavedProperty => [
834
- [ :user_id , :integer ],
835
- [ :mls_acct , :integer ]
300
+ [ :user_id , :integer ],
301
+ [ :mls_number , :integer ]
836
302
  ],
837
303
  CabooseRets::SavedSearch => [
838
- [ :user_id , :integer ],
839
- [ :params , :text ],
840
- [ :date_created , :timestamp ],
841
- [ :date_last , :timestamp ],
842
- [ :interval , :integer ],
304
+ [ :user_id , :integer ],
305
+ [ :params , :text ],
306
+ [ :date_created , :timestamp ],
307
+ [ :date_last , :timestamp ],
308
+ [ :interval , :integer ],
843
309
  [ :property_type , :string ],
844
- [ :uri , :text ],
845
- [ :notify , :boolean ]
310
+ [ :uri , :text ],
311
+ [ :notify , :boolean ]
846
312
  ],
847
313
  CabooseRets::SearchOption => [
848
314
  [ :name , :string ],
@@ -851,52 +317,55 @@ class CabooseRets::Schema < Caboose::Utilities::Schema
851
317
  [ :flag_for_delete , :boolean , { :default => false }]
852
318
  ],
853
319
  Caboose::Site => [
854
- [ :use_rets , :boolean, { :default => false }]
320
+ [ :use_rets , :boolean, { :default => false }]
855
321
  ]
856
- }
857
- end
858
-
859
- def self.load_data
860
-
861
- bt = Caboose::BlockType.where(:name => 'layout_rets').first
862
- if bt.nil?
863
- cat = Caboose::BlockTypeCategory.where(:name => 'Layouts').first
322
+ }
323
+ end
324
+
325
+ def self.load_data
326
+
327
+ bt = Caboose::BlockType.where(:name => 'layout_rets').first
328
+ if bt.nil?
329
+ cat = Caboose::BlockTypeCategory.where(:name => 'Layouts').first
864
330
  bt = Caboose::BlockType.create(:name => 'layout_rets', :description => 'RETS Layout', :block_type_category_id => cat.id, :allow_child_blocks => false, :field_type => 'block')
331
+ end
332
+
333
+ Caboose::Site.where(:use_rets => true).reorder(:id).all.each do |site|
334
+ home_page = Caboose::Page.index_page(site.id)
335
+
336
+ # Check that the rets layout is applied to the site
337
+ bt.add_to_site(site.id)
338
+
339
+ # Verify that the site has all the rets pages created and each page has the rets layout
340
+ rets_page = Caboose::Page.where(:site_id => site.id, :alias => 'rets').first
341
+ rets_page = Caboose::Page.create(:site_id => site.id, :alias => 'rets', :slug => 'rets', :uri => 'rets', :title => 'RETS', :parent_id => home_page.id) if rets_page.nil?
342
+
343
+ pages = []
344
+ if !Caboose::Page.where(:site_id => site.id, :alias => 'property').exists?
345
+ then pages << Caboose::Page.create(:site_id => site.id, :slug => 'properties' , :alias => 'property' , :uri => 'property' , :title => 'Properties' , :parent_id => rets_page.id)
346
+ end
347
+ if !Caboose::Page.where(:site_id => site.id, :alias => 'open-houses' ).exists?
348
+ then pages << Caboose::Page.create(:site_id => site.id, :slug => 'open-houses' , :alias => 'open-houses' , :uri => 'open-houses' , :title => 'Open Houses' , :parent_id => rets_page.id)
349
+ end
350
+ if !Caboose::Page.where(:site_id => site.id, :alias => 'agents' ).exists?
351
+ then pages << Caboose::Page.create(:site_id => site.id, :slug => 'agents' , :alias => 'agents' , :uri => 'agents' , :title => 'Agents' , :parent_id => rets_page.id)
352
+ end
353
+ if !Caboose::Page.where(:site_id => site.id, :alias => 'saved-searches' ).exists?
354
+ then pages << Caboose::Page.create(:site_id => site.id, :slug => 'saved-searches' , :alias => 'saved-searches' , :uri => 'saved-searches' , :title => 'Saved Searches' , :parent_id => rets_page.id)
355
+ end
356
+ if !Caboose::Page.where(:site_id => site.id, :alias => 'saved-properties' ).exists?
357
+ then pages << Caboose::Page.create(:site_id => site.id, :slug => 'saved-properties' , :alias => 'saved-properties' , :uri => 'saved-properties' , :title => 'Saved Properties' , :parent_id => rets_page.id)
865
358
  end
866
-
867
- Caboose::Site.where(:use_rets => true).reorder(:id).all.each do |site|
868
-
869
- home_page = Caboose::Page.index_page(site.id)
870
-
871
- # Check that the rets layout is applied to the site
872
- bt.add_to_site(site.id)
873
-
874
- # Verify that the site has all the rets pages created and each page has the rets layout
875
- rets_page = Caboose::Page.where(:site_id => site.id, :alias => 'rets').first
876
- rets_page = Caboose::Page.create(:site_id => site.id, :alias => 'rets', :slug => 'rets', :uri => 'rets', :title => 'RETS', :parent_id => home_page.id) if rets_page.nil?
877
-
878
- pages = []
879
- if !Caboose::Page.where(:site_id => site.id, :alias => 'residential' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'residential' , :alias => 'residential' , :uri => 'residential' , :title => 'Residential Properties' , :parent_id => rets_page.id) end
880
- if !Caboose::Page.where(:site_id => site.id, :alias => 'commercia' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'commercial' , :alias => 'commercial' , :uri => 'commercial' , :title => 'Commercial Properties' , :parent_id => rets_page.id) end
881
- if !Caboose::Page.where(:site_id => site.id, :alias => 'land' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'land' , :alias => 'land' , :uri => 'land' , :title => 'Land' , :parent_id => rets_page.id) end
882
- if !Caboose::Page.where(:site_id => site.id, :alias => 'multi-family' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'multi-family' , :alias => 'multi-family' , :uri => 'multi-family' , :title => 'Multi-family Properties' , :parent_id => rets_page.id) end
883
- if !Caboose::Page.where(:site_id => site.id, :alias => 'open-houses' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'open-houses' , :alias => 'open-houses' , :uri => 'open-houses' , :title => 'Open Houses' , :parent_id => rets_page.id) end
884
- if !Caboose::Page.where(:site_id => site.id, :alias => 'agents' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'agents' , :alias => 'agents' , :uri => 'agents' , :title => 'Agents' , :parent_id => rets_page.id) end
885
- if !Caboose::Page.where(:site_id => site.id, :alias => 'saved-searches' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'saved-searches' , :alias => 'saved-searches' , :uri => 'saved-searches' , :title => 'Saved Searches' , :parent_id => rets_page.id) end
886
- if !Caboose::Page.where(:site_id => site.id, :alias => 'saved-properties' ).exists? then pages << Caboose::Page.create(:site_id => site.id, :slug => 'saved-properties' , :alias => 'saved-properties' , :uri => 'saved-properties' , :title => 'Saved Properties' , :parent_id => rets_page.id) end
887
359
 
888
360
  pages.each do |p|
889
361
  Caboose::Block.where(:page_id => p.id).destroy_all
890
362
  Caboose::Block.create(:page_id => p.id, :block_type_id => bt.id, :name => bt.name)
891
-
363
+
892
364
  viewers = Caboose::PagePermission.where(:page_id => home_page.id, :action => 'view').pluck(:role_id)
893
365
  editors = Caboose::PagePermission.where(:page_id => home_page.id, :action => 'edit').pluck(:role_id)
894
366
  Caboose::Page.update_authorized_for_action(p.id, 'view', viewers)
895
367
  Caboose::Page.update_authorized_for_action(p.id, 'edit', editors)
896
368
  end
897
-
898
369
  end
899
-
900
370
  end
901
-
902
371
  end