diff options
author | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-03 13:09:49 -0700 |
---|---|---|
committer | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-03 13:09:49 -0700 |
commit | 98d6f3d136a16310300e23b12e6b730ac7ade6b6 (patch) | |
tree | 34ef97bc59f3c34d20a18cd65107655d319097fc /src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword | |
parent | 1d0202a3964637ffb93180a1c89617633ab5ab18 (diff) | |
parent | 0653b90dddc294fddb0e81059aef00b202113d78 (diff) | |
download | rest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.tar.gz rest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.tar.bz2 rest-query-98d6f3d136a16310300e23b12e6b730ac7ade6b6.zip |
Merge branch 'add-slot-eligibility-arms' into trial-46-disease-entity
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/keyword/ApiKeyword.scala | 23 |
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)) - ) -} |