Skip to content

Instantly share code, notes, and snippets.

@MkhytarMkhoian
Last active April 18, 2024 13:29
Show Gist options
  • Save MkhytarMkhoian/21f940b14ae1d2285497ea96822e097a to your computer and use it in GitHub Desktop.
Save MkhytarMkhoian/21f940b14ae1d2285497ea96822e097a to your computer and use it in GitHub Desktop.
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