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
@Parcelize | |
class Task( | |
val id: Int, | |
val description: Description, | |
val priority: Priority = Normal, | |
val status: Status = NotStarted, | |
val attachment: Attachment? = null | |
) : Parcelable | |
@Parcelize | |
class Attachment(val path: String) : Parcelable | |
@Parcelize | |
@JvmInline | |
value class Description(val value: String) : Parcelable | |
enum class Priority { | |
Low, | |
Normal, | |
High | |
} | |
sealed class Status : Parcelable { | |
@Parcelize | |
object NotStarted : Status() | |
@Parcelize | |
object InProgress : Status() | |
@Parcelize | |
class Completed(val completedAt: LocalDate) : Status() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment