[listing]
zakazka_typ.column = 'advert_function'
zakazka_typ.type = 'int'
zakazka_typ.unset[] = 3

advert_lifetime.column = 'advert_lifetime'
advert_lifetime.type = 'int'
advert_lifetime.value = '@sreality_platnost ? @sreality_platnost : 4'

nemovitost_cena_prodej.column = 'advert_price'
nemovitost_cena_prodej.type = 'float'
nemovitost_cena_prodej.value = '@zakazka_typ == 1 ? @this : @nemovitost_cena_pronajem'

nemovitost_mena.column = 'advert_price_currency'
nemovitost_mena.type = 'int'

nemovitost_cena_prodej_jednotka.column = 'advert_price_unit'
nemovitost_cena_prodej_jednotka.type = 'int'
nemovitost_cena_prodej_jednotka.value = '@zakazka_typ == 1 ? @this : @nemovitost_cena_pronajem_jednotka'

nemovitost_typ.column = 'advert_type'
nemovitost_typ.type = 'int'
nemovitost_typ.convert.1 = 4
nemovitost_typ.convert.2 = 4
nemovitost_typ.convert.4 = 1
nemovitost_typ.convert.5 = 2
nemovitost_typ.convert.6 = 2
nemovitost_typ.convert.7 = 4
nemovitost_typ.convert.8 = 4
nemovitost_typ.convert.9 = 4
nemovitost_typ.convert.10 = 2
nemovitost_typ.convert.11 = 5

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

nemovitost_uir_obec_text.column = 'locality_city'
nemovitost_uir_obec_text.type = 'string'

nabidka_gps_presnost.column = 'locality_inaccuracy_level'
nabidka_gps_presnost.type = 'int'
nabidka_gps_presnost.convert.-1 = 2
nabidka_gps_presnost.convert.0  = 3
nabidka_gps_presnost.convert.1  = 1

kod.column[] = 'advert_rkid'
kod.column[] = 'advert_code'
kod.type = 'string'

nemovitost_pocet_pokoju.column = 'advert_room_count'
nemovitost_pocet_pokoju.type = 'int'
nemovitost_pocet_pokoju.convert.1 = '1'
nemovitost_pocet_pokoju.convert.2 = '2'
nemovitost_pocet_pokoju.convert.3 = '3'
nemovitost_pocet_pokoju.convert.4 = '4'
nemovitost_pocet_pokoju.convert.5 = '5'
nemovitost_pocet_pokoju.convert.6 = '6'

advert_subtype.column = 'advert_subtype'
advert_subtype.type = 'int'
advert_subtype.value = '@nemovitost_typ'
advert_subtype.unset = 'inList<@nemovitost_typ, 5, 6, 8> ? @null : @_convertedValue'
advert_subtype.convert.5 = 35
advert_subtype.convert.6 = 37
advert_subtype.convert.8 = 38

nemovitost_dispozice.column = 'advert_subtype'
nemovitost_dispozice.type = 'int'
nemovitost_dispozice.unset = '@nemovitost_typ == 4 ? @null : @this'
nemovitost_dispozice.convert.1 = 2
nemovitost_dispozice.convert.2 = 2
nemovitost_dispozice.convert.3 = 4
nemovitost_dispozice.convert.4 = 6
nemovitost_dispozice.convert.5 = 8
nemovitost_dispozice.convert.6 = 10
nemovitost_dispozice.convert.7 = 12
nemovitost_dispozice.convert.8 = 12
nemovitost_dispozice.convert.9 = 3
nemovitost_dispozice.convert.10 = 5
nemovitost_dispozice.convert.11 = 7
nemovitost_dispozice.convert.12 = 9
nemovitost_dispozice.convert.13 = 11
nemovitost_dispozice.convert.14 = 12
nemovitost_dispozice.convert.15 = 12
nemovitost_dispozice.convert.16 = 16
nemovitost_dispozice.convert.17 = 16

nemovitost_zemedelsky_objekt_podtyp.column = 'advert_subtype'
nemovitost_zemedelsky_objekt_podtyp.type = 'int'
nemovitost_zemedelsky_objekt_podtyp.unset = '@nemovitost_typ == 1 ? @null : @_convertedValue'
nemovitost_zemedelsky_objekt_podtyp.value = '31'

nemovitost_druh_pozemku.column = 'advert_subtype'
nemovitost_druh_pozemku.type = 'int'
nemovitost_druh_pozemku.unset = '@nemovitost_typ == 3 ? @null : @this'
nemovitost_druh_pozemku.convert.1 = 18
nemovitost_druh_pozemku.convert.2 = 19
nemovitost_druh_pozemku.convert.3 = 20
nemovitost_druh_pozemku.convert.4 = 21
nemovitost_druh_pozemku.convert.5 = 22
nemovitost_druh_pozemku.convert.6 = 23
nemovitost_druh_pozemku.convert.7 = 24

nemovitost_ucel_budovy.column = 'advert_subtype'
nemovitost_ucel_budovy.type = 'int'
nemovitost_ucel_budovy.unset = '@nemovitost_typ == 2 ? @null : @this'
nemovitost_ucel_budovy.convert.1 = 26
nemovitost_ucel_budovy.convert.2 = 27
nemovitost_ucel_budovy.convert.3 = 28
nemovitost_ucel_budovy.convert.4 = 28
nemovitost_ucel_budovy.convert.5 = 32
nemovitost_ucel_budovy.convert.6 = 32
nemovitost_ucel_budovy.convert.7 = 25

nemovitost_typ_zarizeni.column = 'advert_subtype'
nemovitost_typ_zarizeni.type = 'int'
nemovitost_typ_zarizeni.unset = '@nemovitost_typ == 7 ? @null : @this'
nemovitost_typ_zarizeni.convert.1 = 29
nemovitost_typ_zarizeni.convert.2 = 29
nemovitost_typ_zarizeni.convert.3 = 30

nemovitost_druh_prostor.column = 'advert_subtype'
nemovitost_druh_prostor.type = 'int'
nemovitost_druh_prostor.unset = '@nemovitost_typ == 9 ? @null : @this'
nemovitost_druh_prostor.convert.1 = 25
nemovitost_druh_prostor.convert.2 = 28
nemovitost_druh_prostor.convert.3 = 26
nemovitost_druh_prostor.convert.4 = 32
nemovitost_druh_prostor.convert.5 = 27

nemovitost_typ_rekreacniho_objektu.column = 'advert_subtype'
nemovitost_typ_rekreacniho_objektu.type = 'int'
nemovitost_typ_rekreacniho_objektu.unset = '@nemovitost_typ == 10 ? @null : @this'
nemovitost_typ_rekreacniho_objektu.convert.1 = 33
nemovitost_typ_rekreacniho_objektu.convert.2 = 43
nemovitost_typ_rekreacniho_objektu.convert.3 = 33

nemovitost_typ_maleho_objektu.column = 'advert_subtype'
nemovitost_typ_maleho_objektu.type = 'int'
nemovitost_typ_maleho_objektu.unset = '@nemovitost_typ == 11 ? @null : @this'
nemovitost_typ_maleho_objektu.convert.1 = 34
nemovitost_typ_maleho_objektu.convert.2 = 36
nemovitost_typ_maleho_objektu.convert.3 = 52

nemovitost_balkon.column = 'balcony'
nemovitost_balkon.type = 'bool'
nemovitost_balkon.value = '@this > 0 ? 1 : 0'

; nemovitost_vytah se převádí v PHP

nemovitost_stav_objektu.column = 'building_condition'
nemovitost_stav_objektu.type = 'int'

nemovitost_druh_objektu.column = 'building_type'
nemovitost_druh_objektu.type = 'int'

nemovitost_sklep.column = 'cellar'
nemovitost_sklep.type = 'bool'
nemovitost_sklep.value = '@this > 0 ? 1 : 0'

nemovitost_plocha_parcely.column = 'estate_area'
nemovitost_plocha_parcely.type = 'int'

nemovitost_plocha_celkova_pozemek.column = 'estate_area'
nemovitost_plocha_celkova_pozemek.type = 'int'
nemovitost_plocha_celkova_pozemek.value = '@nemovitost_plocha_celkova'
nemovitost_plocha_celkova_pozemek.unset = '@nemovitost_typ == 3 ? @null : @_convertedValue'

exclusively_at_rk.column = 'exclusively_at_rk'
exclusively_at_rk.type = 'bool'
exclusively_at_rk.value = '@zakazka_typ_smlouvy == 10 ? 1 : 0'

nemovitost_podlazi_cislo.column = 'floor_number'
nemovitost_podlazi_cislo.type = 'int'

nemovitost_garaz.column = 'garage'
nemovitost_garaz.type = 'bool'
nemovitost_garaz.value = '@this > 0 ? 1 : 0'


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

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

nemovitost_lodzie.column = 'loggia'
nemovitost_lodzie.type = 'bool'
nemovitost_lodzie.value = '@this > 0 ? 1 : 0'

nemovitost_typ_domu.column = 'object_type'
nemovitost_typ_domu.type = 'int'

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

; parkovací místa převádíme v PHP
parking_lots.column = 'parking_lots'
parking_lots.type = 'bool'

; vazba na projekt, případně ji unsetnem, pokud není
id_projekt.column = 'project_rkid'
id_projekt.type = 'string'
id_projekt.unset = '@this<1 ? @this : @null'

id_uzivatel.column = 'seller_rkid'
id_uzivatel.type = 'string'

nemovitost_terasa.column = 'terrace'
nemovitost_terasa.type = 'bool'
nemovitost_terasa.value = '@this > 0 ? 1 : 0'

nemovitost_plocha_uzitna.column = 'usable_area'
nemovitost_plocha_uzitna.type = 'int'

nemovitost_plocha_uzitna_komercni_objekty_a_prostory.column = 'usable_area'
nemovitost_plocha_uzitna_komercni_objekty_a_prostory.type = 'int'
nemovitost_plocha_uzitna_komercni_objekty_a_prostory.value = '@nemovitost_plocha_uzitna > 0 ? @nemovitost_plocha_uzitna : @nemovitost_plocha_celkova'
nemovitost_plocha_uzitna_komercni_objekty_a_prostory.unset = 'inList<@nemovitost_typ, 2, 9> ? @null : @_convertedValue'

nemovitost_plocha_uzitna_male_objekty_a_garaze.column = 'usable_area'
nemovitost_plocha_uzitna_male_objekty_a_garaze.type = 'int'
nemovitost_plocha_uzitna_male_objekty_a_garaze.value = '@nemovitost_plocha_uzitna > 0 ? @nemovitost_plocha_uzitna : @nemovitost_plocha_zastavena'
nemovitost_plocha_uzitna_male_objekty_a_garaze.unset = 'inList<@nemovitost_typ, 11> ? @null : @_convertedValue'

; pokud je vyplněná užitná i celková; posíláme celkovou jako floor_area jinak jako usable_area
nemovitost_plocha_celkova_byty.column = '@nemovitost_plocha_uzitna > 0 ? floor_area : usable_area'
nemovitost_plocha_celkova_byty.type = 'int'
nemovitost_plocha_celkova_byty.value = '@nemovitost_plocha_celkova'
nemovitost_plocha_celkova_byty.unset = 'inList<@nemovitost_typ, 4> ? @null : @_convertedValue'

nemovitost_rok_kolaudace.column = 'acceptance_year'
nemovitost_rok_kolaudace.type = 'int'

nemovitost_cena_poznamka.column = 'advert_price_text_note'
nemovitost_cena_poznamka.type = 'string'

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

nemovitost_balkon_plocha.column = 'balcony_area'
nemovitost_balkon_plocha.type = 'int'
nemovitost_balkon_plocha.unset = '@nemovitost_balkon > 0 ? @null : @this'

nemovitost_bazen.column = 'basin'
nemovitost_bazen.type = 'bool'
nemovitost_bazen.value = '@this > 0 ? 1 : 0'

nemovitost_bazen_plocha.column = 'basin_area'
nemovitost_bazen_plocha.type = 'int'

nemovitost_plocha_zastavena.column = 'building_area'
nemovitost_plocha_zastavena.type = 'int'

nemovitost_vyska_stropu.column = 'ceiling_height'
nemovitost_vyska_stropu.type = 'float'

nemovitost_sklep_plocha.column = 'cellar_area'
nemovitost_sklep_plocha.type = 'int'
nemovitost_sklep_plocha.unset = '@nemovitost_sklep > 0 ? @null : @this'

nemovitost_popis_detailni_en.column = 'description_en'
nemovitost_popis_detailni_en.type = 'string'

nemovitost_bezbarierovy.column = 'easy_access'
nemovitost_bezbarierovy.type = 'int'
nemovitost_bezbarierovy.convert.-1 = 0
nemovitost_bezbarierovy.convert.1 = 1
nemovitost_bezbarierovy.convert.0 = 2

nemovitost_energeticky_stitek.column = 'energy_efficiency_rating'
nemovitost_energeticky_stitek.type = 'int'
nemovitost_energeticky_stitek.convert.0 = 0
nemovitost_energeticky_stitek.convert.1 = 1
nemovitost_energeticky_stitek.convert.2 = 2
nemovitost_energeticky_stitek.convert.3 = 3
nemovitost_energeticky_stitek.convert.4 = 4
nemovitost_energeticky_stitek.convert.5 = 5
nemovitost_energeticky_stitek.convert.6 = 6
nemovitost_energeticky_stitek.convert.7 = 7

nemovitost_merna_rocni_spotreba.column = 'energy_performance_summary'
nemovitost_merna_rocni_spotreba.type = 'float'
nemovitost_merna_rocni_spotreba.convert.0 = 0

nemovitost_energeticky_stitek_priloha.column = 'energy_performance_attachment'
nemovitost_energeticky_stitek_priloha.type = 'string'
;plus ještě nějaká magie v php
;tato příloha je ve skutečnosti base64 zakódovaný obsah souboru

nemovitost_energeticky_stitek_vyhlaska.column = 'energy_performance_certificate'
nemovitost_energeticky_stitek_vyhlaska.type = 'int'
nemovitost_energeticky_stitek_vyhlaska.convert.1 = 1
nemovitost_energeticky_stitek_vyhlaska.convert.2 = 2

nemovitost_elektrina.column = 'electricity'
nemovitost_elektrina.type = 'array of int'
nemovitost_elektrina.convert.0 = 1
nemovitost_elektrina.convert.1 = 2
nemovitost_elektrina.convert.3 = 4
nemovitost_elektrina.unset[] = 2

nemovitost_vybaveno.column = 'furnished'
nemovitost_vybaveno.type = 'int'
nemovitost_vybaveno.convert.0=2
nemovitost_vybaveno.convert.1=1
nemovitost_vybaveno.unset=-1

zakazka_stav.column = 'extra_info'
zakazka_stav.type = 'int'
zakazka_stav.convert.10 = 0
zakazka_stav.convert.20 = 0
zakazka_stav.convert.30 = 1
zakazka_stav.convert.40 = 2
zakazka_stav.convert.50 = 0

nemovitost_plocha_celkova.column = 'floor_area'
nemovitost_plocha_celkova.type = 'int'

nemovitost_pocet_podlazi.column = 'floors'
nemovitost_pocet_podlazi.type = 'int'
nemovitost_pocet_podlazi.value = '@this + @nemovitost_pocet_podlazi_pod_zemi'

nemovitost_plocha_zahrada.column = 'garden_area'
nemovitost_plocha_zahrada.type = 'int'

nemovitost_pudni_vestavba.column = 'garret'
nemovitost_pudni_vestavba.type = 'bool'
nemovitost_pudni_vestavba.value = '@this > 0 ? 1 : 0'

nemovitost_plyn.column = 'gas'
nemovitost_plyn.type = 'array of int'
nemovitost_plyn.convert.0 = 1
nemovitost_plyn.convert.1 = 2

nemovitost_odpad.column = 'gully'
nemovitost_odpad.type = 'array of int'
nemovitost_odpad.convert.0 = 1
nemovitost_odpad.convert.1 = 2

nemovitost_topeni.column = 'heating'
nemovitost_topeni.type = 'array of int'
nemovitost_topeni.convert.0 = 1
nemovitost_topeni.convert.1 = 2
nemovitost_topeni.convert.2 = 3
nemovitost_topeni.convert.3 = 4
nemovitost_topeni.convert.4 = 5
nemovitost_topeni.convert.5 = 6
nemovitost_topeni.convert.6 = 7
nemovitost_topeni.convert.7 = 8

nemovitost_uir_co.column = 'locality_co'
nemovitost_uir_co.type = 'string'

nemovitost_uir_cp.column = 'locality_cp'
nemovitost_uir_cp.type = 'string'

nemovitost_lodzie_plocha.column = 'loggia_area'
nemovitost_lodzie_plocha.type = 'int'
nemovitost_lodzie_plocha.unset = '@nemovitost_lodzie > 0 ? @null : @this'

nemovitost_plocha_nebytovych_prostor.column = 'nolive_total_area'
nemovitost_plocha_nebytovych_prostor.type = 'int'

nemovitost_rok_vystavby.column = 'object_age'
nemovitost_rok_vystavby.type = 'int'

nemovitost_poloha_objektu.column = 'object_kind'
nemovitost_poloha_objektu.type = 'int'

nemovitost_umisteni_objektu.column = 'object_location'
nemovitost_umisteni_objektu.type = 'int'

nemovitost_pocet_kancelari.column = 'offices'
nemovitost_pocet_kancelari.type = 'int'

nemovitost_plocha_kancelari.column = 'offices_area'
nemovitost_plocha_kancelari.type = 'int'

pocet_mist_k_parkovani.column = 'parking'
pocet_mist_k_parkovani.type = 'int'
pocet_mist_k_parkovani.value = '@this ? @this : @nemovitost_pocet_mist'

nemovitost_plocha_vyrobni.column = 'production_area'
nemovitost_plocha_vyrobni.type = 'int'

nemovitost_datum_nastehovani.column = 'ready_date'
nemovitost_datum_nastehovani.type = 'string'
nemovitost_datum_nastehovani.value = 'date<Ymd\TH:i:s, @this>'
nemovitost_datum_nastehovani.unset = '@null'

nemovitost_rok_rekonstrukce.column = 'reconstruction_year'
nemovitost_rok_rekonstrukce.type = 'int'

nemovitost_komunikace.column = 'road_type'
nemovitost_komunikace.type = 'array of int'

nemovitost_plocha_obchodni.column = 'shop_area'
nemovitost_plocha_obchodni.type = 'int'

nemovitost_plocha_skladu.column = 'store_area'
nemovitost_plocha_skladu.type = 'int'

nemovitost_charakter_zastavby.column = 'surroundings_type'
nemovitost_charakter_zastavby.type = 'int'

; telekomunikace převádíme v PHP

nemovitost_terasa_plocha.column = 'terrace_area'
nemovitost_terasa_plocha.type = 'int'
nemovitost_terasa_plocha.unset = '@nemovitost_terasa > 0 ? @null : @this'

nemovitost_doprava.column = 'transport'
nemovitost_doprava.type = 'array of int'
nemovitost_doprava.convert.0 = 1
nemovitost_doprava.convert.1 = 2
nemovitost_doprava.convert.2 = 3
nemovitost_doprava.convert.3 = 4
nemovitost_doprava.convert.4 = 5

nemovitost_pocet_podlazi_pod_zemi.column = 'underground_floors'
nemovitost_pocet_podlazi_pod_zemi.type = 'int'

nemovitost_plocha_uzitna_prizemi.column = 'usable_area_ground'
nemovitost_plocha_uzitna_prizemi.type = 'int'

aktivni_zakazka.column = 'user_status'
aktivni_zakazka.type = 'bool'
aktivni_zakazka.value = 1

nemovitost_voda.column = 'water'
nemovitost_voda.type = 'array of int'
nemovitost_voda.convert.0 = 1
nemovitost_voda.convert.1 = 2
nemovitost_voda.unset[] = 2

nemovitost_sirka.column = 'width'
nemovitost_sirka.type = 'int'

nemovitost_plocha_dilna.column = 'workshop_area'
nemovitost_plocha_dilna.type = 'int'

[project]
projekt_popis.column = 'annotation'
projekt_popis.type = 'string'

projekt_nazev.column = 'project_name'
projekt_nazev.type = 'string'

projekt_zakladni_popis.column = 'description'
projekt_zakladni_popis.type = 'string'

nemovitost_uir_obec_text.column = 'locality_city'
nemovitost_uir_obec_text.type = 'string'

projekt_lokalita.column = 'locality_description'
projekt_lokalita.type = 'string'

project_lifetime.column = 'project_lifetime'
project_lifetime.type = 'int'
project_lifetime.value = 2

;konec povinnych

id.column = 'project_rkid'
id.type = 'string'

projekt_ukonceni_stavby.column = 'date_construct_completion'
projekt_ukonceni_stavby.type = 'string'
projekt_ukonceni_stavby.value = 'date<Ymd\TH:i:s, @this>'
projekt_ukonceni_stavby.unset = '@null'

projekt_k_nastehovani.column = 'date_move'
projekt_k_nastehovani.type = 'string'
projekt_k_nastehovani.value = 'date<Ymd\TH:i:s, @this>'
projekt_k_nastehovani.unset = '@null'

projekt_zahajeni_prodeje.column = 'date_sale'
projekt_zahajeni_prodeje.type = 'string'
projekt_zahajeni_prodeje.value = 'date<Ymd\TH:i:s, @this>'
projekt_zahajeni_prodeje.unset = '@null'

;ve verzi 2.1.3 (a níž) by bylo nutné odesílat IČ developera, verze 2.1.4 už to nevyžaduje

;locality_uir a locality_uir_level jde přes php

;;dodatečné info;;
;v komentářích jsou vyjmenována jejich pole která neumíme implementovat
;ceilings - mají číselník my jenom input

klient_firma_ic.column = 'developer_ic'
klient_firma_ic.type = int

;doors - mají číselník my input
;facade_coats - číselník vs input

zaklady.column = 'foundations'
zaklady.type = string

;floors - číselník vs input
;interior_plasters - číselník vs. input
;interior_staircase - nemáme

vnitrni_obklady.column = 'interior_wall_lining'
vnitrni_obklady.type = string

projekt_kuchynska_linka.column = 'kitchen_cabinets'
projekt_kuchynska_linka.type = int
projekt_kuchynska_linka.convert.0 = 2
projekt_kuchynska_linka.convert.1 = 1
; čp a čo
nemovitost_uir_co.column = 'locality_co'
nemovitost_uir_co.type = 'string'

nemovitost_uir_cp.column = 'locality_cp'
nemovitost_uir_cp.type = 'string'

;zeměpisná šířka a délka
nabidka_gps_x.column = 'locality_latitude'
nabidka_gps_x.type = 'float'
nabidka_gps_x.value = 'degToFloat<@this>'

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

;reinforced_concrete_staircase - nevedeme
;roof - číselník vs input
;roofing - číselník vs input

id_uzivatel.column = 'seller_rkid'
id_uzivatel.type = 'string'

;sheetmetal_structure - číselník vs input
;siding - číselník vs input
;windows - číselník vs input

