Commit ee2d844f authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

add tour preview to model as api updated

parent 811a6796
......@@ -35,7 +35,8 @@ data class EstateRaw(
val plan_jpg:PlanRaw?,
val url:String,
val album_id:Int,
val multitour_id:Int?
val multitour_id:Int?,
val multitour_preview:String?
)
data class PlanRaw(
......
......@@ -38,6 +38,9 @@ interface Estate : Persistable {
@get:Nullable
val multitourId: Int?
@get:Nullable
val multitourPreview: String?
val info_building: Int
val info_section_begin: Int
val info_floor: Int
......
......@@ -137,6 +137,7 @@ fun fromRaw(raw:EstateRaw):EstateEntity{
entity.setRooms(raw.common_info.rooms)
entity.setAlbumId(raw.album_id)
entity.setMultitourId(raw.multitour_id)
entity.setMultitourPreview(raw.multitour_preview)
entity.setUrl(raw.url)
entity.setInfo_floor_max(raw.common_info.floor_max)
......
......@@ -35,7 +35,7 @@ data class DealPreviewModel(
data.first.amount_pay_sum,
arrayListOf<Int?>(data.first.estate.multitourId),
false,
null,
data.first.estate.multitourPreview,
data.second
)
}
......
......@@ -56,6 +56,7 @@ data class EstateModel(
val rooms:Int?=null,
val albumId:Int?=null,
val multitourId:Int?=null,
val multitourPreview:String?=null,
val commonInfo:CommonInfoModel? = null,
val url:String?
)
......@@ -94,6 +95,7 @@ fun fromEntity(entity:EstateEntity): EstateModel {
rooms = entity.rooms,
albumId = entity.albumId,
multitourId = entity.multitourId,
multitourPreview = entity.multitourPreview,
commonInfo = CommonInfoModel(
building = entity.info_building,
section_begin = entity.sectionBegin,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment