Last active
April 18, 2024 13:29
-
-
Save MkhytarMkhoian/21f940b14ae1d2285497ea96822e097a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Category( | |
val categoryId: Long, | |
val image: String?, | |
val children: List<Category>, | |
val name: String, | |
val adsCount: Int?, | |
val feedType: FeedType, | |
) { | |
val hasChildren: Boolean | |
get() = children.isNotEmpty() | |
val hasAds: Boolean | |
get() = adsCount != null && adsCount > 0 | |
enum class FeedType(val id: String) { | |
MAP("map"), | |
DEFAULT("default"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment