Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. @Entity(tableName = WEATHER_TABLE_NAME)
  2. data class WeatherEntity(@PrimaryKey val id: Int? = 0,
  3. val weather: ArrayList<Weather>?,
  4. @Embedded
  5. val main: MainInfo?,
  6. val name: String? = "") : DomainMapper<WeatherInfo> {
  7.  
  8. override fun mapToDomainModel() = WeatherInfo(main?.temp ?: 0.0, main?.humidity ?: 0, main?.pressure ?: 0.0)
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement