Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
1091d10b
Commit
1091d10b
authored
Oct 16, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added new estates models sample
parent
e8efc237
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
272 additions
and
16 deletions
+272
-16
favorites.kt
...om/biganto/visual/roompark/domain/interactor/favorites.kt
+238
-2
deals.kt
...in/java/com/biganto/visual/roompark/domain/model/deals.kt
+34
-14
No files found.
app/src/main/java/com/biganto/visual/roompark/domain/interactor/favorites.kt
View file @
1091d10b
package
com.biganto.visual.roompark.domain.interactor
import
com.biganto.visual.roompark.domain.model.*
import
io.reactivex.Single
import
javax.inject.Inject
/**
...
...
@@ -7,5 +9,239 @@ import javax.inject.Inject
*/
class
FavoritesInteractor
@Inject
constructor
(
){
)
{
fun
getFavoritesForCurrentUser
()
=
Single
.
just
(
parkingEstateSample
)
companion
object
{
val
parkingEstateSample
=
arrayListOf
(
EstateModel
(
id
=
2273
,
type
=
"parking"
,
number
=
"П1.021"
,
commonInfo
=
CommonInfoModel
(
building
=
1
,
section_begin
=
1
,
floor
=
-
1
,
floor_max
=
13
,
area
=
13.25f
,
area_living
=
0.00f
,
kind
=
null
,
decoration
=
"Без отделки, свободная планировка"
,
ceiling
=
null
,
windows_face
=
null
,
direction
=
null
,
price_meter
=
null
,
price
=
1170025
,
discount
=
null
,
discount_amount
=
970025
,
rooms
=
null
),
planPNG
=
null
,
planJPG
=
null
,
dependent
=
false
,
albumId
=
10
,
multitourId
=
null
,
explications
=
null
),
EstateModel
(
id
=
1905
,
type
=
"storage"
,
number
=
"104.23"
,
commonInfo
=
CommonInfoModel
(
building
=
1
,
section_begin
=
4
,
floor
=
-
1
,
floor_max
=
13
,
area
=
2.78f
,
area_living
=
0.00f
,
kind
=
null
,
decoration
=
"beez otdelki"
,
ceiling
=
null
,
windows_face
=
null
,
direction
=
null
,
price_meter
=
69676
,
price
=
193700
,
discount
=
null
,
discount_amount
=
null
,
rooms
=
null
),
planPNG
=
null
,
planJPG
=
null
,
dependent
=
false
,
albumId
=
10
,
multitourId
=
null
,
explications
=
null
),
EstateModel
(
id
=
1774
,
type
=
"flat"
,
number
=
"417"
,
commonInfo
=
CommonInfoModel
(
building
=
1
,
section_begin
=
6
,
floor
=
5
,
floor_max
=
20
,
area
=
40.00f
,
area_living
=
16.30f
,
kind
=
"1к-2"
,
decoration
=
"Без отделки, свободная планировкаотделки"
,
ceiling
=
2.95f
,
windows_face
=
"Двор"
,
direction
=
"восток"
,
price_meter
=
142808
,
price
=
5712300
,
discount
=
5.00f
,
discount_amount
=
5426685
,
rooms
=
1
),
planPNG
=
PlanModel
(
url
=
"https://room-park.ru/assets/estates/plan_png/00/00/06/1774-a0e8d6.png"
,
width
=
281
,
height
=
292
),
planJPG
=
PlanModel
(
url
=
"https://room-park.ru/assets/estates/plan_jpg/00/00/06/1774-6b330b.jpeg"
,
width
=
693
,
height
=
720
),
dependent
=
null
,
albumId
=
10
,
multitourId
=
"https://biganto.com/show/5970/?iframe=1"
,
explications
=
arrayListOf
<
ExplicationsItemModel
>(
ExplicationsItemModel
(
planId
=
0
,
items
=
arrayListOf
(
ExplicationModel
(
living
=
true
,
area
=
16.30f
,
title
=
"Спальня"
),
ExplicationModel
(
living
=
false
,
area
=
11.40f
,
title
=
"Кухня"
),
ExplicationModel
(
living
=
false
,
area
=
1.90f
,
title
=
"Прихожая"
),
ExplicationModel
(
living
=
false
,
area
=
5.20f
,
title
=
"Коридор"
),
ExplicationModel
(
living
=
false
,
area
=
1.70f
,
title
=
"Лоджия"
),
ExplicationModel
(
living
=
false
,
area
=
3.50f
,
title
=
"Санузел"
)
)
),
ExplicationsItemModel
(
planId
=
1
,
items
=
arrayListOf
(
ExplicationModel
(
living
=
true
,
area
=
16.30f
,
title
=
"Спальня"
),
ExplicationModel
(
living
=
false
,
area
=
11.40f
,
title
=
"Кухня"
),
ExplicationModel
(
living
=
false
,
area
=
5.20f
,
title
=
"Коридор"
),
ExplicationModel
(
living
=
false
,
area
=
1.90f
,
title
=
"Прихожая"
),
ExplicationModel
(
living
=
false
,
area
=
3.50f
,
title
=
"Санузел"
),
ExplicationModel
(
living
=
false
,
area
=
1.70f
,
title
=
"Лоджия"
)
)
),
ExplicationsItemModel
(
planId
=
2
,
items
=
arrayListOf
(
ExplicationModel
(
living
=
false
,
area
=
1.00f
,
title
=
"Кухня-гостиная"
),
ExplicationModel
(
living
=
false
,
area
=
2.00f
,
title
=
"Коридор"
),
ExplicationModel
(
living
=
false
,
area
=
3.00f
,
title
=
"Прихожая"
),
ExplicationModel
(
living
=
false
,
area
=
4.00f
,
title
=
"Санузел"
),
ExplicationModel
(
living
=
false
,
area
=
5.00f
,
title
=
"Лоджия"
)
)
)
)
)
)
}
}
app/src/main/java/com/biganto/visual/roompark/domain/model/deals.kt
View file @
1091d10b
...
...
@@ -19,19 +19,19 @@ data class DealModel(
data class
EstateModel
(
val
id
:
Int
,
val
type
:
String
,
val
number
:
String
,
val
building
:
Int
,
val
sectionBegin
:
Int
?=
null
,
val
sectionEnd
:
Int
?=
null
,
val
floor
:
Int
,
val
area
:
Float
,
val
planPNG
:
PlanModel
,
val
planJPG
:
PlanModel
,
val
planPNG
:
PlanModel
?,
val
planJPG
:
PlanModel
?,
val
dependent
:
Boolean
?=
null
,
val
rooms
:
Int
?=
null
,
val
albumId
:
Int
?=
null
,
val
multitourId
:
Int
?=
null
val
multitourId
:
String
?=
null
,
val
commonInfo
:
CommonInfoModel
?
=
null
,
val
explications
:
List
<
ExplicationsItemModel
>?
=
null
)
data class
PlanModel
(
...
...
@@ -40,18 +40,38 @@ data class PlanModel(
val
height
:
Int
)
data class
ExplicationItemModel
(
val
id
:
Int
,
val
estateId
:
Int
,
val
title
:
String
,
val
value
:
Float
,
val
livingType
:
String
data class
CommonInfoModel
(
val
building
:
Int
,
val
section_begin
:
Int
,
val
floor
:
Int
,
val
floor_max
:
Int
,
val
area
:
Float
?,
val
area_living
:
Float
?,
val
kind
:
String
?,
val
decoration
:
String
?,
val
ceiling
:
Float
?,
val
windows_face
:
String
?,
val
direction
:
String
?,
val
price_meter
:
Int
?,
val
price
:
Int
?,
val
discount
:
Float
?,
val
discount_amount
:
Int
?,
val
rooms
:
Int
?
)
data class
ExplicationsItemModel
(
val
planId
:
Int
,
val
items
:
List
<
ExplicationModel
>
)
data class
ExplicationModel
(
val
items
:
List
<
ExplicationItemModel
>
val
living
:
Boolean
,
val
area
:
Float
,
val
title
:
String
)
/*
data class CommonEstateInfoModel(
val corpus:Int,
val section:Int,
...
...
@@ -68,4 +88,4 @@ data class CommonEstateInfoModel(
val costPerM2:Float,
val totalSum:Float
)
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment