-
-
Save Kaaveh/2f50ee03a0bb086d9f77109d51dda198 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
import ir.composenews.domain.model.Market | |
data class MarketModel( | |
val id: String, | |
val name: String, | |
val currentPrice: Double, | |
val imageUrl: String, | |
val isFavorite: Boolean = false, | |
) | |
fun MarketModel.toMarket() = Market( | |
id = id, | |
name = name, | |
currentPrice = currentPrice, | |
imageUrl = imageUrl, | |
isFavorite = isFavorite, | |
) | |
fun Market.toMarketModel() = MarketModel( | |
id = id, | |
name = name, | |
currentPrice = currentPrice, | |
imageUrl = imageUrl, | |
isFavorite = isFavorite, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment