From 47c46a9790442d7fb347770b7f561b849bcac9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Sun, 7 Jan 2024 19:32:37 +0900 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=A4=91=EB=B3=B5?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/pickdsm/pickserverspring/domain/user/User.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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') + } +}