-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat/#131] 이메일 구독 내용 채워서 구현 #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드 성 enum 클래스 모듈별 중복 발생 해결 이슈 #168 는 따로 등록해놨습니다.
나중에 리펙토링하면서 해결하는걸로 하시죠
enum class BatchCategoryType(val code: Byte, val displayName: String) { | ||
ECONOMY(0, "경제"), | ||
IT(10, "IT"), | ||
MARKETING(20, "마케팅"), | ||
CULTURE(30, "교양"), | ||
SCIENCE(40, "과학"); | ||
|
||
companion object { | ||
fun fromCode(code: Byte): BatchCategoryType? { | ||
return entries.find { it.code == code } | ||
} | ||
|
||
fun convertToCode(displayName: String): Byte { | ||
return entries.find { it.name == displayName }?.code ?: throw IllegalArgumentException("Invalid category name") | ||
} | ||
|
||
fun convertToDisplayName(code: Byte): String { | ||
return entries.find { it.code == code }?.displayName ?: throw IllegalArgumentException("Invalid category code") | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CategoryType과 BatchCategoryType이 가진 카테고리 값들은 왜 서로 다른가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎫 연관 이슈
resolved: #131
💁♂️ PR 내용
🙏 작업
🙈 PR 참고 사항
📸 스크린샷
🤖 테스트 체크리스트