From b5e0d5f91b52013bc11ef3ea586a54bb001577bc Mon Sep 17 00:00:00 2001 From: vlad Date: Sun, 1 Oct 2017 12:50:54 -0700 Subject: Fixing IN in filters, Model from EVLS added to common, Reusing domain model labels --- .../formats/json/keyword/ApiKeyword.scala | 23 ---------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala') 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)) - ) -} -- cgit v1.2.3