From fd0c446dd1b2f8631bdbdf524d6f74e58fa89df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B8=B0=EC=9D=80=EC=84=9C?= <101038047+eunseo0105@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:13:20 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20Agency.kt=20=EC=9E=84=EC=8B=9C=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moneymong/moneymong/feature/agency/search/Agency.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt index 594479fe..0f5d6ea2 100644 --- a/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt +++ b/feature/agency/src/main/java/com/moneymong/moneymong/feature/agency/search/Agency.kt @@ -16,6 +16,7 @@ fun AgencyGetResponse.toAgency(): Agency { type = when (this.type) { "IN_SCHOOL_CLUB" -> AgencyType.CLUB "STUDENT_COUNCIL" -> AgencyType.COUNCIL + "GENERAL" -> AgencyType.GENERAL //임의로 설정 -> 추후 소속 코드 반영 else -> throw IllegalArgumentException("Unknown type: $type") }, name = this.name, @@ -29,6 +30,7 @@ fun MyAgencyResponse.toAgency(): Agency { type = when (this.type) { "IN_SCHOOL_CLUB" -> AgencyType.CLUB "STUDENT_COUNCIL" -> AgencyType.COUNCIL + "GENERAL" -> AgencyType.GENERAL //임의로 설정 -> 추후 소속 코드 반영 else -> throw IllegalArgumentException("Unknown type: $type") }, name = this.name, @@ -38,10 +40,13 @@ fun MyAgencyResponse.toAgency(): Agency { enum class AgencyType(val text: String) { CLUB(text = "동아리"), - COUNCIL(text = "학생회"); + COUNCIL(text = "학생회"), + GENERAL(text ="기타"); //임의로 설정 -> 추후 소속 코드 반영 fun agencyRegisterTypeToString(): String = when (this) { CLUB -> "IN_SCHOOL_CLUB" COUNCIL -> "STUDENT_COUNCIL" + GENERAL -> "IN_SCHOOL_CLUB" //임의로 설정 -> 추후 소속 코드 반영 + } } \ No newline at end of file