-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
40 additions
and
43 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Aos/app/src/main/java/com/avengers/nibobnebob/data/model/response/BaseResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.avengers.nibobnebob.data.model.response | ||
|
||
data class BaseResponse<T>( | ||
val data: T, | ||
val message: String, | ||
val statusCode: Int, | ||
) |
6 changes: 0 additions & 6 deletions
6
Aos/app/src/main/java/com/avengers/nibobnebob/data/model/response/MyDefaultInfoResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
...java/com/avengers/nibobnebob/presentation/ui/main/mypage/mapper/UiMyPageInfoDataMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package com.avengers.nibobnebob.presentation.ui.main.mypage.mapper | ||
|
||
import com.avengers.nibobnebob.data.model.response.Base | ||
import com.avengers.nibobnebob.data.model.response.MyInfoResponse | ||
import com.avengers.nibobnebob.presentation.ui.main.mypage.model.UiMyPageInfoData | ||
|
||
internal fun Base.toUiMyPageInfoData() = UiMyPageInfoData( | ||
nickName = data.userInfo.nickName, | ||
age = data.userInfo.birthdate, | ||
location = data.userInfo.region, | ||
gender = if(data.userInfo.isMale) "남" else "여" | ||
internal fun MyInfoResponse.toUiMyPageInfoData() = UiMyPageInfoData( | ||
nickName = userInfo.nickName, | ||
age = userInfo.birthdate, | ||
location = userInfo.region, | ||
gender = if(userInfo.isMale) "남" else "여" | ||
) |
16 changes: 7 additions & 9 deletions
16
...java/com/avengers/nibobnebob/presentation/ui/main/mypage/mapper/UiMypageEditInfoMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
package com.avengers.nibobnebob.presentation.ui.main.mypage.mapper | ||
|
||
import com.avengers.nibobnebob.data.model.response.BaseEdit | ||
import com.avengers.nibobnebob.data.model.response.MyDefaultInfoResponse | ||
import com.avengers.nibobnebob.data.model.response.MyInfoResponse | ||
import com.avengers.nibobnebob.presentation.ui.main.mypage.model.UiMyPageEditInfoData | ||
|
||
fun BaseEdit.toUiMyPageEditInfoData() = UiMyPageEditInfoData( | ||
nickName = data.userInfo.nickName, | ||
email = data.userInfo.email, | ||
provider = data.userInfo.provider, | ||
birth = data.userInfo.birthdate, | ||
location = data.userInfo.region, | ||
gender = data.userInfo.isMale | ||
fun MyDefaultInfoResponse.toUiMyPageEditInfoData() = UiMyPageEditInfoData( | ||
nickName = userInfo.nickName, | ||
email = userInfo.email, | ||
provider = userInfo.provider, | ||
birth = userInfo.birthdate, | ||
location = userInfo.region, | ||
gender = userInfo.isMale | ||
) |