Skip to content

Instantly share code, notes, and snippets.

@oharaandrew314
Created March 15, 2022 23:48
Show Gist options
  • Select an option

  • Save oharaandrew314/6b076a6a501dcebcf289c227048c2ece to your computer and use it in GitHub Desktop.

Select an option

Save oharaandrew314/6b076a6a501dcebcf289c227048c2ece to your computer and use it in GitHub Desktop.
hexagonal-clients-port
data class Cat(
val id: String,
val name: String,
val ownerId: String,
val ownerName: String,
val brown: Boolean,
val grey: Boolean,
val breed: Breed?,
val appointments: List<Instant>,
val favouriteFood: String? = null // new field; defaulting to null for backwards compatibility
)
fun interface CatsDao {
operator fun get(id: String): Cat?
companion object
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment