Created
March 8, 2021 17:59
-
-
Save lammertw/7d4c20252cb3b23ea479fbeccb385122 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
interface RestaurantDetailViewModel { | |
val output: CFlow<Output> | |
data class Output( | |
val name: String, | |
val priceCategory: String, | |
val reservations: Reservations | |
) { | |
sealed class Reservations { | |
object Loading: Reservations() | |
data class NoReservations(val text: String): Reservations() | |
data class ReservationList(val items: List<Reservation>): Reservations() { | |
data class Reservation(val id: Int, val date: String, val numberOfGuests: Int) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment