All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gravity.gdk.article.ArticleKey.scala Maven / Gradle / Ivy

The newest version!
package com.gravity.gdk.article

import play.api.libs.json._

/*
              ___...---''
  ___...---'\'___
''       _.-''  _`'.______\\.
        /_.)  )..-  __..--'\\
       (    __..--''
        '-''\@


 Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ
*/

/** UUID for an article in the Gravity DB. This is generally internal use only. */
case class ArticleKey(articleId: Long) extends AnyVal

object ArticleKey {
  private[gdk] implicit val jsonFormatter: Format[ArticleKey] = Format(
    Reads.StringReads.map(jsStr => ArticleKey(jsStr.toLong)),
    Writes[ArticleKey](ak => JsString(ak.articleId.toString))
  )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy