Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
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
8c5e77c4
Commit
8c5e77c4
authored
Dec 26, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix db plan types && explications mapping
parent
6ceae663
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
39 deletions
+58
-39
Estate.kt
...isual/roompark/data/repository/db/requrey/model/Estate.kt
+1
-1
PlanPreset.kt
...l/roompark/data/repository/db/requrey/model/PlanPreset.kt
+1
-1
raw2entity.kt
...anto/visual/roompark/data/repository/mapper/raw2entity.kt
+56
-0
deals.kt
...in/java/com/biganto/visual/roompark/domain/model/deals.kt
+0
-37
No files found.
app/src/main/java/com/biganto/visual/roompark/data/repository/db/requrey/model/Estate.kt
View file @
8c5e77c4
...
...
@@ -66,5 +66,5 @@ interface Estate : Persistable {
val
info_direction
:
String
?
@get
:
OneToMany
(
mappedBy
=
"id"
,
cascade
=
[
CascadeAction
.
SAVE
,
CascadeAction
.
DELETE
])
val
planPreset
:
Se
t
<
PlanPreset
>
val
planPreset
:
MutableLis
t
<
PlanPreset
>
}
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/data/repository/db/requrey/model/PlanPreset.kt
View file @
8c5e77c4
...
...
@@ -21,5 +21,5 @@ interface PlanPreset : Persistable {
@get
:
Convert
(
StringListConverter
::
class
)
val
features
:
List
<
String
>
@get
:
OneToMany
(
mappedBy
=
"id"
,
cascade
=
[
CascadeAction
.
SAVE
,
CascadeAction
.
DELETE
])
val
explication
:
Se
t
<
Explication
>
val
explication
:
MutableLis
t
<
Explication
>
}
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/data/repository/mapper/raw2entity.kt
View file @
8c5e77c4
...
...
@@ -93,6 +93,62 @@ fun fromRaw(raw:ResolutionRaw) =
fun
fromRaw
(
raw
:
EstateRaw
):
EstateEntity
{
val
entity
=
EstateEntity
()
entity
.
setId
(
raw
.
id
)
entity
.
setType
(
raw
.
type
)
entity
.
setNumber
(
raw
.
number
)
entity
.
setSectionBegin
(
raw
.
common_info
.
section_begin
)
entity
.
setSectionEnd
(
raw
.
common_info
.
section_end
)
entity
.
setPlanJpgUrl
(
raw
.
plan_jpg
?.
url
)
entity
.
setPlanJpgWidth
(
raw
.
plan_jpg
?.
width
)
entity
.
setPlanJpgHeight
(
raw
.
plan_jpg
?.
height
)
entity
.
setPlanPngUrl
(
raw
.
plan_png
?.
url
)
entity
.
setPlanPngWidth
(
raw
.
plan_png
?.
width
)
entity
.
setPlanPngHeight
(
raw
.
plan_png
?.
height
)
entity
.
setRooms
(
raw
.
common_info
.
rooms
)
entity
.
setAlbumId
(
raw
.
album_id
)
entity
.
setMultitourId
(
raw
.
multitour_id
)
entity
.
setUrl
(
raw
.
url
)
entity
.
setInfo_floor_max
(
raw
.
common_info
.
floor_max
)
entity
.
setInfo_area
(
raw
.
common_info
.
area
)
entity
.
setInfo_area_living
(
raw
.
common_info
.
area_living
)
entity
.
setInfo_kind
(
raw
.
common_info
.
kind
)
entity
.
setInfo_dependent
(
raw
.
common_info
.
dependent
)
entity
.
setInfo_decoration
(
raw
.
common_info
.
decoration
)
entity
.
setInfo_building
(
raw
.
common_info
.
building
)
entity
.
setInfo_section_begin
(
raw
.
common_info
.
section_begin
)
entity
.
setInfo_floor
(
raw
.
common_info
.
floor
)
entity
.
setInfo_window_face
(
raw
.
common_info
.
windows_face
)
entity
.
setInfo_price
(
raw
.
common_info
.
price
)
entity
.
setInfo_price_meter
(
raw
.
common_info
.
price_meter
)
entity
.
setInfo_ceiling
(
raw
.
common_info
.
ceiling
)
entity
.
setInfo_direction
(
raw
.
common_info
.
direction
)
return
entity
}
fun
fromRaw
(
raw
:
PlanTypeRaw
):
PlanPresetEntity
{
val
entity
=
PlanPresetEntity
()
entity
.
setFeatures
(
raw
.
features
)
entity
.
setPlanId
(
raw
.
plan_id
)
entity
.
setTitle
(
raw
.
title
)
entity
.
explication
.
clear
()
entity
.
explication
.
addAll
(
fromRawList
(
raw
.
explication
!!
,
::
fromRaw
))
return
entity
}
fun
fromRaw
(
raw
:
EstateRoomRaw
):
ExplicationEntity
{
val
entity
=
ExplicationEntity
()
entity
.
setArea
(
raw
.
area
)
entity
.
setLiving
(
raw
.
living
)
entity
.
setTitle
(
raw
.
title
)
return
entity
}
//fun fromRaw(raw: List<FeedRaw>):List<FeedEntity> = List(raw.displaySize) { index-> fromRaw(raw[index]) }
...
...
app/src/main/java/com/biganto/visual/roompark/domain/model/deals.kt
View file @
8c5e77c4
...
...
@@ -45,43 +45,6 @@ data class EstateModel(
val
url
:
String
?
)
fun
fromRaw
(
raw
:
EstateRaw
):
EstateEntity
{
val
entity
=
EstateEntity
()
entity
.
setId
(
raw
.
id
)
entity
.
setType
(
raw
.
type
)
entity
.
setNumber
(
raw
.
number
)
entity
.
setSectionBegin
(
raw
.
common_info
.
section_begin
)
entity
.
setSectionEnd
(
raw
.
common_info
.
section_end
)
entity
.
setPlanJpgUrl
(
raw
.
plan_jpg
?.
url
)
entity
.
setPlanJpgWidth
(
raw
.
plan_jpg
?.
width
)
entity
.
setPlanJpgHeight
(
raw
.
plan_jpg
?.
height
)
entity
.
setPlanPngUrl
(
raw
.
plan_png
?.
url
)
entity
.
setPlanPngWidth
(
raw
.
plan_png
?.
width
)
entity
.
setPlanPngHeight
(
raw
.
plan_png
?.
height
)
entity
.
setRooms
(
raw
.
common_info
.
rooms
)
entity
.
setAlbumId
(
raw
.
album_id
)
entity
.
setMultitourId
(
raw
.
multitour_id
)
entity
.
setUrl
(
raw
.
url
)
entity
.
setInfo_floor_max
(
raw
.
common_info
.
floor_max
)
entity
.
setInfo_area
(
raw
.
common_info
.
area
)
entity
.
setInfo_area_living
(
raw
.
common_info
.
area_living
)
entity
.
setInfo_kind
(
raw
.
common_info
.
kind
)
entity
.
setInfo_dependent
(
raw
.
common_info
.
dependent
)
entity
.
setInfo_decoration
(
raw
.
common_info
.
decoration
)
entity
.
setInfo_building
(
raw
.
common_info
.
building
)
entity
.
setInfo_section_begin
(
raw
.
common_info
.
section_begin
)
entity
.
setInfo_floor
(
raw
.
common_info
.
floor
)
entity
.
setInfo_window_face
(
raw
.
common_info
.
windows_face
)
entity
.
setInfo_price
(
raw
.
common_info
.
price
)
entity
.
setInfo_price_meter
(
raw
.
common_info
.
price_meter
)
entity
.
setInfo_ceiling
(
raw
.
common_info
.
ceiling
)
entity
.
setInfo_direction
(
raw
.
common_info
.
direction
)
return
entity
}
data class
PlanModel
(
val
url
:
String
,
val
width
:
Int
,
...
...
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