Skip to content

Commit

Permalink
[feat] : ResponseLoginDto map 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chanubc committed Jan 3, 2024
1 parent 5ebd6ba commit f84ee04
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.sopt.dosopttemplate.data.dto.remote.respose

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import org.sopt.dosopttemplate.domain.entity.UserEntity

@Serializable
data class ResponseLoginDto(
Expand All @@ -10,5 +11,12 @@ data class ResponseLoginDto(
@SerialName("username")
val username: String,
@SerialName("nickname")
val nickname: String? = null,
)
val nickname: String,
) {
fun toUserEntity() = UserEntity(
id = username,
pwd = "",
nickName = nickname,
mbti = "",
)
}

0 comments on commit f84ee04

Please sign in to comment.