Created
August 13, 2019 13:11
-
-
Save LukaKordic/90fe8dfe8f6b8b51abd7be6569976442 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
@Entity(tableName = WEATHER_TABLE_NAME) | |
data class WeatherEntity(@PrimaryKey val id: Int? = 0, | |
val weather: ArrayList<Weather>?, | |
@Embedded | |
val main: MainInfo?, | |
val name: String? = "") : DomainMapper<WeatherInfo> { | |
override fun mapToDomainModel() = WeatherInfo(main?.temp ?: 0.0, main?.humidity ?: 0, main?.pressure ?: 0.0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment