Skip to content

Commit

Permalink
[feat] : ResponseReqresDto mapping 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chanubc committed Jan 2, 2024
1 parent 4926d40 commit d95815f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.sopt.dosopttemplate.data.dto.remote.respose

import kotlinx.serialization.Serializable
import org.sopt.dosopttemplate.domain.entity.ReqresEntity

@Serializable
data class ResponseReqresDto(
Expand All @@ -25,4 +26,14 @@ data class ResponseReqresDto(
val text: String,
val url: String,
)

fun toReqresList(): List<ReqresEntity> = data.map {
ReqresEntity(
id = it.id,
email = it.email,
first_name = it.first_name,
last_name = it.last_name,
avatar = it.avatar,
)
}
}

0 comments on commit d95815f

Please sign in to comment.