;;
; Hyperreality
;;
; rozhraní Individual 2
;;

[advert]

id.column = 'foreign_id'
id.type = 'int'

nemovitost_titulek.column = 'name'
nemovitost_titulek.type = 'string'

nemovitost_popis_zakladni.column = 'description'
nemovitost_popis_zakladni.type = 'string'
nemovitost_popis_zakladni.value = '@nemovitost_popis_zakladni @nemovitost_popis_detailni'

zakazka_typ.column = 'offer_type_id'
zakazka_typ.type = 'int'
zakazka_typ.convert.1 = '1'
zakazka_typ.convert.2 = '2'

zakazka_stav.column = 'advert_state_id'
zakazka_stav.type = 'int'
zakazka_stav.convert.10 = '1'
zakazka_stav.convert.20 = '2'
zakazka_stav.convert.30 = '3'
zakazka_stav.convert.40 = '4'
zakazka_stav.convert.41 = '4'
zakazka_stav.convert.50 = '5'

zakazka_typ_smlouvy.column = 'contact_type_id'
zakazka_typ_smlouvy.type = 'int'
zakazka_typ_smlouvy.value = '@this==10 ? 1 : 0'

nemovitost_vlastnictvi.column = 'ownership_type_id'
nemovitost_vlastnictvi.type = 'int'
nemovitost_vlastnictvi.convert.1 = '1'
nemovitost_vlastnictvi.convert.2 = '2'
nemovitost_vlastnictvi.convert.3 = '6'
nemovitost_vlastnictvi.convert.4 = '3'
nemovitost_vlastnictvi.convert.5 = '6'
nemovitost_vlastnictvi.convert.6 = '5'
nemovitost_vlastnictvi.convert.7 = '6'

nemovitost_stav_objektu.column = 'realty_state_id'
nemovitost_stav_objektu.type = 'int'
nemovitost_stav_objektu.convert.1 = '2'
nemovitost_stav_objektu.convert.2 = '3'
nemovitost_stav_objektu.convert.3 = '4'
nemovitost_stav_objektu.convert.4 = '8'
nemovitost_stav_objektu.convert.5 = '8'
nemovitost_stav_objektu.convert.6 = '1'
nemovitost_stav_objektu.convert.7 = '14'
nemovitost_stav_objektu.convert.8 = '13'
nemovitost_stav_objektu.convert.9 = '11'

nemovitost_podlazi_cislo.column = 'floor_id'
nemovitost_podlazi_cislo.type = 'int'
nemovitost_podlazi_cislo.value = '@this>20 ? 20 : @this'
nemovitost_podlazi_cislo.unset = '0'

nemovitost_topeni.column = 'heating_type'
nemovitost_topeni.type = 'int'
nemovitost_topeni.convert.0 = 1; Lokální - plynové
nemovitost_topeni.convert.1 = 2; Lokální - tuhá paliva
nemovitost_topeni.convert.2 = 3; Lokální - elektrické
nemovitost_topeni.convert.3 = 4; Ústřední - plynové
nemovitost_topeni.convert.4 = 5; Ústřední - tuhá paliva
nemovitost_topeni.convert.5 = 6; Ústřední - elektrické
nemovitost_topeni.convert.6 = 7; Ústřední - dálkové
nemovitost_topeni.convert.7 = 8; Jiné

nemovitost_druh_objektu.column = 'building_type_id'
nemovitost_druh_objektu.type = 'int'
nemovitost_druh_objektu.convert.1 = '5'
nemovitost_druh_objektu.convert.2 = '2'
nemovitost_druh_objektu.convert.3 = '6'
nemovitost_druh_objektu.convert.4 = '7'
nemovitost_druh_objektu.convert.5 = '1'
nemovitost_druh_objektu.convert.6 = '4'
nemovitost_druh_objektu.convert.7 = '8'

nemovitost_poloha_objektu.column = 'object_location_id'
nemovitost_poloha_objektu.type = 'int'
nemovitost_poloha_objektu.convert.1 = '1'
nemovitost_poloha_objektu.convert.2 = '2'
nemovitost_poloha_objektu.convert.3 = '3'
nemovitost_poloha_objektu.convert.4 = '4'

nemovitost_typ_domu.column = 'house_type_id'
nemovitost_typ_domu.type = 'int'
nemovitost_typ_domu.convert.1 = '1'
nemovitost_typ_domu.convert.2 = '3'

nemovitost_energeticky_stitek.column = 'energy_label'
nemovitost_energeticky_stitek.type = 'string'
nemovitost_energeticky_stitek.convert.1 = 'A'
nemovitost_energeticky_stitek.convert.2 = 'B'
nemovitost_energeticky_stitek.convert.3 = 'C'
nemovitost_energeticky_stitek.convert.4 = 'D'
nemovitost_energeticky_stitek.convert.5 = 'E'
nemovitost_energeticky_stitek.convert.6 = 'F'
nemovitost_energeticky_stitek.convert.7 = 'G'

nemovitost_bytu_celkem.column = 'flats_count'
nemovitost_bytu_celkem.type = 'int'

kod.column = 'contract_number'
kod.type = 'string'

nemovitost_anuita.column = 'annuity'
nemovitost_anuita.type = 'int'

nemovitost_rok_vystavby.column = 'year_of_development'
nemovitost_rok_vystavby.type = 'int'

nemovitost_rok_rekonstrukce.column = 'year_of_reconstruction'
nemovitost_rok_rekonstrukce.type = 'int'

nemovitost_pocet_podlazi.column = 'floors_number'
nemovitost_pocet_podlazi.type = 'int'

nemovitost_terasa.column = 'terrace'
nemovitost_terasa.type = 'int'

nemovitost_balkon.column = 'balcony'
nemovitost_balkon.type = 'int'

nemovitost_lodzie.column = 'loggia'
nemovitost_lodzie.type = 'int'

nemovitost_sklep.column = 'cellar'
nemovitost_sklep.type = 'int'

nemovitost_garaz.column = 'garage'
nemovitost_garaz.type = 'int'

telekomunikace_telefon.column = 'phone'
telekomunikace_telefon.type = 'int'
telekomunikace_telefon.value = 'substr<@nemovitost_telekomunikace,0,1>'

telekomunikace_internet.column = 'internet'
telekomunikace_internet.type = 'int'
telekomunikace_internet.value = 'substr<@nemovitost_telekomunikace,1,1>'

category_id.column = 'category_id'
category_id.type = 'int'
;převod kategorií je voodo v php

nemovitost_uir_stat.column = 'country_id'
nemovitost_uir_stat.type = 'string'
nemovitost_uir_stat.convert.CZ = '58'

nemovitost_uir_kraj_kod.column = 'region_id'
nemovitost_uir_kraj_kod.type = 'int'

nemovitost_uir_okres_kod.column = 'district_id'
nemovitost_uir_okres_kod.type = 'int'

nemovitost_uir_obec_kod.column = 'city_id'
nemovitost_uir_obec_kod.type = 'int'

nemovitost_uir_cobce_kod.column = 'citypart_id'
nemovitost_uir_cobce_kod.type = 'int'

nemovitost_uir_ulice_kod.column = 'street_id'
nemovitost_uir_ulice_kod.type = 'int'

cityverge_id.column = 'cityverge_id'
cityverge_id.type = 'int'

psc.column = 'zip_code'
psc.type = 'string'

cena.column = 'amount'
cena.type = 'int'
cena.value = '@zakazka_typ==1 ? @nemovitost_cena_prodej : @nemovitost_cena_pronajem'

cena_jednotka.column = 'price_type_id'
cena_jednotka.type = 'int'
cena_jednotka.value = '@zakazka_typ==1 ? @nemovitost_cena_prodej_jednotka : @nemovitost_cena_pronajem_jednotka'
cena_jednotka.convert.1 = '1' ;celkem
cena_jednotka.convert.2 = '3' ;za mesic
cena_jednotka.convert.3 = '2' ;za m2
cena_jednotka.convert.4 = '4' ;m2/mesic
cena_jednotka.convert.5 = '6' ;m2/rok
cena_jednotka.convert.6 = '5' ;rok
cena_jednotka.convert.7 = '7' ;den

nemovitost_mena.column = 'currency_id'
nemovitost_mena.type = 'int'
nemovitost_mena.convert.1 = '1'
nemovitost_mena.convert.2 = '3'
nemovitost_mena.convert.3 = '2'

nemovitost_cena_poznamka.column = 'price_note'
nemovitost_cena_poznamka.type = 'string'

; hlavní plocha (area) se vybírá v PHP
nemovitost_plocha_parcely.column = 'lot_area'
nemovitost_plocha_parcely.type = 'int'
nemovitost_plocha_parcely.unset = '"@this" ? @null : @_convertedValue'

nemovitost_plocha_vlastni_pozemek.column = 'lot_area'
nemovitost_plocha_vlastni_pozemek.type = 'int'
nemovitost_plocha_vlastni_pozemek.unset = '"@this" ? @null : @_convertedValue'

nemovitost_plocha_zastavena.column = 'built_up_area'
nemovitost_plocha_zastavena.type = 'int'
nemovitost_plocha_zastavena.unset = '"@this" ? @null : @_convertedValue'

nemovitost_plocha_uzitna.column = 'flooring_area'
nemovitost_plocha_uzitna.type = 'int'
nemovitost_plocha_uzitna.unset = '"@this" ? @null : @_convertedValue'

nabidka_gps_x.column = 'gpsLat'
nabidka_gps_x.type = 'float'
nabidka_gps_x.value = 'degToFloat<@this>'

nabidka_gps_y.column = 'gpsLon'
nabidka_gps_y.type = 'float'
nabidka_gps_y.value = 'degToFloat<@this>'

[broker]

id_uzivatel.column = 'broker_foreign_id'
id_uzivatel.type = 'string'
id_uzivatel.value = 'M@id'

jmeno_cele.column = 'broker_name'
jmeno_cele.type = 'string'

email.column = 'broker_email'
email.type = 'string'

telefon.column = 'broker_phone'
telefon.type = 'string'
