Last active
August 30, 2019 13:51
-
-
Save LukaKordic/9abf4c59b91ab50c6070c07e213de974 to your computer and use it in GitHub Desktop.
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
data class WeatherInfoResponse(val id: Int? = 0, | |
val weather: List<Weather>?, | |
val main: MainInfo?, | |
val name: String? = "") : RoomMapper<WeatherEntity> { | |
override fun mapToRoomEntity() = WeatherEntity(id ?: 0, weather ?: emptyList(), main ?: MainInfo(), name) | |
} | |
data class MainInfo(val temp: Double? = 0.0, | |
val pressure: Double? = 0.0, | |
val humidity: Int? = 0) | |
data class Weather(val id: Int? = 0, | |
val main: String? = "", | |
val description: String? = "", | |
val icon: String? = "") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment