diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/hypothesis')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/hypothesis/ApiHypothesis.scala | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/hypothesis/ApiHypothesis.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/hypothesis/ApiHypothesis.scala index 7446ec3..bf18a60 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/hypothesis/ApiHypothesis.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/hypothesis/ApiHypothesis.scala @@ -2,11 +2,20 @@ package xyz.driver.pdsuidomain.formats.json.hypothesis import java.util.UUID -import xyz.driver.pdsuidomain.entities.Hypothesis import play.api.libs.functional.syntax._ import play.api.libs.json.{Format, JsPath} +import xyz.driver.pdsuicommon.domain.UuidId +import xyz.driver.pdsuidomain.entities.Hypothesis + +final case class ApiHypothesis(id: UUID, name: String, treatmentType: String, description: String) { -final case class ApiHypothesis(id: UUID, name: String, treatmentType: String, description: String) + def toDomain = Hypothesis( + id = UuidId[Hypothesis](id), + name = name, + treatmentType = treatmentType, + description = description + ) +} object ApiHypothesis { |