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( ...@@ -35,7 +35,8 @@ data class EstateRaw(
val plan_jpg:PlanRaw?, val plan_jpg:PlanRaw?,
val url:String, val url:String,
val album_id:Int, val album_id:Int,
val multitour_id:Int? val multitour_id:Int?,
val multitour_preview:String?
) )
data class PlanRaw( data class PlanRaw(
......
...@@ -38,6 +38,9 @@ interface Estate : Persistable { ...@@ -38,6 +38,9 @@ interface Estate : Persistable {
@get:Nullable @get:Nullable
val multitourId: Int? val multitourId: Int?
@get:Nullable
val multitourPreview: String?
val info_building: Int val info_building: Int
val info_section_begin: Int val info_section_begin: Int
val info_floor: Int val info_floor: Int
......
...@@ -137,6 +137,7 @@ fun fromRaw(raw:EstateRaw):EstateEntity{ ...@@ -137,6 +137,7 @@ fun fromRaw(raw:EstateRaw):EstateEntity{
entity.setRooms(raw.common_info.rooms) entity.setRooms(raw.common_info.rooms)
entity.setAlbumId(raw.album_id) entity.setAlbumId(raw.album_id)
entity.setMultitourId(raw.multitour_id) entity.setMultitourId(raw.multitour_id)
entity.setMultitourPreview(raw.multitour_preview)
entity.setUrl(raw.url) entity.setUrl(raw.url)
entity.setInfo_floor_max(raw.common_info.floor_max) entity.setInfo_floor_max(raw.common_info.floor_max)
......
...@@ -35,7 +35,7 @@ data class DealPreviewModel( ...@@ -35,7 +35,7 @@ data class DealPreviewModel(
data.first.amount_pay_sum, data.first.amount_pay_sum,
arrayListOf<Int?>(data.first.estate.multitourId), arrayListOf<Int?>(data.first.estate.multitourId),
false, false,
null, data.first.estate.multitourPreview,
data.second data.second
) )
} }
......
...@@ -56,6 +56,7 @@ data class EstateModel( ...@@ -56,6 +56,7 @@ data class EstateModel(
val rooms:Int?=null, val rooms:Int?=null,
val albumId:Int?=null, val albumId:Int?=null,
val multitourId:Int?=null, val multitourId:Int?=null,
val multitourPreview:String?=null,
val commonInfo:CommonInfoModel? = null, val commonInfo:CommonInfoModel? = null,
val url:String? val url:String?
) )
...@@ -94,6 +95,7 @@ fun fromEntity(entity:EstateEntity): EstateModel { ...@@ -94,6 +95,7 @@ fun fromEntity(entity:EstateEntity): EstateModel {
rooms = entity.rooms, rooms = entity.rooms,
albumId = entity.albumId, albumId = entity.albumId,
multitourId = entity.multitourId, multitourId = entity.multitourId,
multitourPreview = entity.multitourPreview,
commonInfo = CommonInfoModel( commonInfo = CommonInfoModel(
building = entity.info_building, building = entity.info_building,
section_begin = entity.sectionBegin, 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