From d513a25c6f21c351e182934fc07e146403af1f98 Mon Sep 17 00:00:00 2001 From: gidskql6671 Date: Thu, 30 May 2024 13:58:35 +0900 Subject: [PATCH] =?UTF-8?q?UserDto=EC=97=90=20id=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/knu/dong/onedayonebaek/user/dto/UserDto.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/back/src/main/kotlin/knu/dong/onedayonebaek/user/dto/UserDto.kt b/back/src/main/kotlin/knu/dong/onedayonebaek/user/dto/UserDto.kt index 1942c17..9cd1d41 100644 --- a/back/src/main/kotlin/knu/dong/onedayonebaek/user/dto/UserDto.kt +++ b/back/src/main/kotlin/knu/dong/onedayonebaek/user/dto/UserDto.kt @@ -11,8 +11,11 @@ data class UserDto( val name: String, @Schema(description = "github profile url", nullable = false, example = "https://avatars.githubusercontent.com/u/23000498?v=4") - val profileUrl: String + val profileUrl: String, + + @Schema(description = "User ID", nullable = false, example = "1") + val id: Long? = null ) -fun UserDto.toEntity() = User(loginId, name, profileUrl) -fun User.toUserDto() = UserDto(loginId, name, profileUrl) \ No newline at end of file +fun UserDto.toEntity() = User(loginId = loginId, name = name, profileUrl = profileUrl) +fun User.toUserDto() = UserDto(loginId = loginId, name = name, profileUrl = profileUrl, id = id) \ No newline at end of file