-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/com/reditus/novelcia/novel/domain/NovelRankingSearchDays.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.reditus.novelcia.novel.domain | ||
|
||
enum class NovelRankingSearchDays(val value: Int) { | ||
DAY_1(1), | ||
DAY_7(7), | ||
DAY_30(30),; | ||
|
||
companion object { | ||
fun from(days: Int): NovelRankingSearchDays { | ||
return entries.find { it.value == days } | ||
?: throw IllegalArgumentException("해당하는 일자가 없습니다. days: $days") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters