aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala
diff options
context:
space:
mode:
authorMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:08:00 -0700
committerMarvin Bertin <marvin.bertin@gmail.com>2017-10-03 13:08:00 -0700
commit0653b90dddc294fddb0e81059aef00b202113d78 (patch)
tree3d8abb424b0f0495f1cbb18849184dd20d6897fc /src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala
parent5750f2f3633e75f2f96d6a36264ab4b8f3fec7d2 (diff)
parenta321a978353439fc516b0f2016c28fb32ba1b7ae (diff)
downloadrest-query-0653b90dddc294fddb0e81059aef00b202113d78.tar.gz
rest-query-0653b90dddc294fddb0e81059aef00b202113d78.tar.bz2
rest-query-0653b90dddc294fddb0e81059aef00b202113d78.zip
Merge branch 'master' into add-slot-eligibility-arms
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala
deleted file mode 100644
index a9d02fc..0000000
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala
+++ /dev/null
@@ -1,23 +0,0 @@
-package xyz.driver.pdsuidomain.formats.json.keyword
-
-import xyz.driver.pdsuidomain.entities.KeywordWithLabels
-import play.api.libs.functional.syntax._
-import play.api.libs.json.{Format, JsPath}
-import xyz.driver.pdsuidomain.formats.json.label.ApiLabel
-
-final case class ApiKeyword(id: Long, keyword: String, labels: List[ApiLabel])
-
-object ApiKeyword {
-
- implicit val format: Format[ApiKeyword] = (
- (JsPath \ "id").format[Long] and
- (JsPath \ "keyword").format[String] and
- (JsPath \ "labels").format[List[ApiLabel]]
- )(ApiKeyword.apply, unlift(ApiKeyword.unapply))
-
- def fromDomain(keywordWithLabels: KeywordWithLabels) = ApiKeyword(
- id = keywordWithLabels.keyword.id.id,
- keyword = keywordWithLabels.keyword.keyword,
- labels = keywordWithLabels.labels.map(x => ApiLabel(x.id.id, x.name, x.categoryId.id))
- )
-}