-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 선택 가능한 어조를 조회한다 * refactor: Enum 요소를 가져오는 방법을 수정한다
- Loading branch information
Showing
4 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
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
17 changes: 17 additions & 0 deletions
17
src/main/kotlin/me/misik/api/api/response/ReviewStyleResponse.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,17 @@ | ||
package me.misik.api.api.response | ||
|
||
import me.misik.api.domain.ReviewStyle | ||
|
||
data class ReviewStyleResponse( | ||
val icon: String, | ||
val style: String | ||
) { | ||
companion object { | ||
fun from(reviewStyle: ReviewStyle): ReviewStyleResponse { | ||
return ReviewStyleResponse( | ||
icon = reviewStyle.iconUrl, | ||
style = reviewStyle.name, | ||
) | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/kotlin/me/misik/api/api/response/ReviewStylesResponse.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,15 @@ | ||
package me.misik.api.api.response | ||
|
||
import me.misik.api.domain.ReviewStyle | ||
|
||
data class ReviewStylesResponse( | ||
val reviewStyles: List<ReviewStyleResponse> | ||
) { | ||
companion object { | ||
fun from(reviewStyles: List<ReviewStyle>) : ReviewStylesResponse { | ||
return ReviewStylesResponse( | ||
reviewStyles.map { ReviewStyleResponse.from(it) }.toList() | ||
) | ||
} | ||
} | ||
} |