-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfileMapper.kt
More file actions
26 lines (23 loc) · 854 Bytes
/
ProfileMapper.kt
File metadata and controls
26 lines (23 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.poti.android.data.mapper
import com.poti.android.data.remote.dto.response.user.ProfileResponseDto
import com.poti.android.data.remote.dto.response.user.RecruitSummaryDto
import com.poti.android.domain.model.user.HistorySummary
import com.poti.android.domain.model.user.UserProfile
fun ProfileResponseDto.toDomain(): UserProfile =
UserProfile(
userId = userId,
email = email,
nickname = nickname,
profileImageUrl = profileImageUrl,
ratingAvg = ratingAvg,
activityMessage = activityMessage,
joinedAt = joinedAt,
hasFavoriteArtist = hasFavoriteArtist,
recruitSummary = recruitSummary.toDomain(),
)
fun RecruitSummaryDto.toDomain(): HistorySummary =
HistorySummary(
total = total,
inProgress = inProgress,
completed = completed,
)