Skip to content

Commit

Permalink
refactor: (#286) toDomain 간편화
Browse files Browse the repository at this point in the history
  • Loading branch information
khcho0125 committed Jan 13, 2023
1 parent 121a19c commit 373def6
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,7 @@ class UserMapper(
}

override fun toDomain(entity: UserJpaEntity?): User? {
return entity?.let {
User.of(
id = it.id!!,
nickname = it.nickname,
name = it.name,
email = it.email,
password = it.password,
employeeNumber = it.employeeNumber,
authority = it.authority,
spotId = it.spot.id!!,
teamId = it.team.id!!,
profileImagePath = it.profileImagePath,
deletedAt = it.deletedAt
)
}
return entity?.let(::toDomainNotNull)
}

override fun toDomainNotNull(entity: UserJpaEntity): User {
Expand Down

0 comments on commit 373def6

Please sign in to comment.