diff --git a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/User.kt b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/User.kt index f6ab988c..3553830e 100644 --- a/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/User.kt +++ b/pick-application/src/main/kotlin/com/pickdsm/pickserverspring/domain/user/User.kt @@ -13,4 +13,9 @@ data class User( val num: Int, val birthDay: LocalDate, val profileFileName: String?, -) +) { + companion object { + fun User.processGcn() = "${this.grade}${this.classNum}${this.paddedUserNum()}" + private fun User.paddedUserNum(): String = this.num.toString().padStart(2, '0') + } +}