Skip to content

Commit

Permalink
Fix: Agency.kt 임시 파일
Browse files Browse the repository at this point in the history
  • Loading branch information
eunseo0105 committed Aug 7, 2024
1 parent e9a5b95 commit fd0c446
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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" //임의로 설정 -> 추후 소속 코드 반영

}
}

0 comments on commit fd0c446

Please sign in to comment.