Skip to content

Instantly share code, notes, and snippets.

@joan38
Last active May 21, 2018 09:15
Show Gist options
  • Save joan38/7fcfb253918b110ea766cb4673cc745e to your computer and use it in GitHub Desktop.
Save joan38/7fcfb253918b110ea766cb4673cc745e to your computer and use it in GitHub Desktop.
object Post {
implicit val record: Record[Id[Post], Post] = new Record[Id[Post], Post] {
val topic = "posts"
def key(post: Post): Id[Post] = post.id
def timestamp(post: Post): Long = post.updatedOn.toEpochMilli
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment