Skip to content

Instantly share code, notes, and snippets.

@DenisBronx
Created April 16, 2020 23:05
Show Gist options
  • Save DenisBronx/2cc69334ff94790d54e754947bad5740 to your computer and use it in GitHub Desktop.
Save DenisBronx/2cc69334ff94790d54e754947bad5740 to your computer and use it in GitHub Desktop.
// Aggregate
data class Album(
val id: String,
val title: String,
val songs: List<Song>
)
// Entity
data class Song(
val id: String,
val name: String,
val link: String,
val duration: Long,
val metadata: Metadata
) {
// Value Object
data class Metadata(
val creationDate: Long,
val uploadDate: Long,
val authorFullName: String
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment