-
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.
Merge pull request #29 from Nexters/feature/22-add-webcam-slope-id
[#22] 스키장 슬로프, 웹캠 정보 조회 API 식별자 추가
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,25 +1,29 @@ | ||
package nexters.weski.slope | ||
|
||
data class SlopeDto( | ||
val slopeId: Long, | ||
val name: String, | ||
val difficulty: String, | ||
val isDayOperating: Boolean, | ||
val isNightOperating: Boolean, | ||
val isLateNightOperating: Boolean, | ||
val isDawnOperating: Boolean, | ||
val isMidnightOperating: Boolean | ||
val isMidnightOperating: Boolean, | ||
val webcamNo: Int? | ||
) { | ||
companion object { | ||
fun fromEntity(entity: Slope): SlopeDto { | ||
return SlopeDto( | ||
slopeId = entity.id, | ||
name = entity.name, | ||
difficulty = entity.difficulty.name, | ||
isDayOperating = entity.isDayOperating, | ||
isNightOperating = entity.isNightOperating, | ||
isLateNightOperating = entity.isLateNightOperating, | ||
isDawnOperating = entity.isDawnOperating, | ||
isMidnightOperating = entity.isMidnightOperating | ||
isMidnightOperating = entity.isMidnightOperating, | ||
webcamNo = entity.webcamNumber | ||
) | ||
} | ||
} | ||
} | ||
} |