Skip to content

Commit

Permalink
Fix UserRes
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhello0507 committed Oct 6, 2024
1 parent 60330f0 commit 6d88df3
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
}

0 comments on commit 6d88df3

Please sign in to comment.