diff --git a/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/api/user/dto/UserRes.kt b/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/api/user/dto/UserRes.kt index 075f4df..af6f2f5 100644 --- a/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/api/user/dto/UserRes.kt +++ b/Graduating-Server/src/main/kotlin/com/bestswlkh0310/graduating/graduatingserver/api/user/dto/UserRes.kt @@ -2,21 +2,23 @@ package com.bestswlkh0310.graduating.graduatingserver.api.user.dto import com.bestswlkh0310.graduating.graduatingserver.core.school.SchoolEntity import com.bestswlkh0310.graduating.graduatingserver.core.user.UserEntity +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +@JsonIgnoreProperties(ignoreUnknown = true) data class UserRes( val id: Long, val email: String, - val nickname: String, - val graduatingYear: Int, - val school: SchoolEntity + val nickname: String?, + val graduatingYear: Int?, + val school: SchoolEntity? ) { companion object { fun of(user: UserEntity) = UserRes( id = user.id, email = user.email, - nickname = user.nickname!!, - graduatingYear = user.graduatingYear!!, - school = user.school!! + nickname = user.nickname, + graduatingYear = user.graduatingYear, + school = user.school ) } } \ No newline at end of file