diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-10-11 16:56:06 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 16:56:06 +0700 |
commit | 3375f1beeab7af9a6732d6fce8762c3a3038e1f3 (patch) | |
tree | e4f1ad85a2ea17c76bcc844420d5f97bfd116e23 /src/main/scala/xyz/driver/pdsuidomain/formats/json/slotarm/ApiSlotCreateArm.scala | |
parent | bbbcaf35a6081dba24dbb9a9aeb9d25fc2ca60be (diff) | |
parent | 85c78f58f0428d13795aa0419ff42471513a34d6 (diff) | |
download | rest-query-3375f1beeab7af9a6732d6fce8762c3a3038e1f3.tar.gz rest-query-3375f1beeab7af9a6732d6fce8762c3a3038e1f3.tar.bz2 rest-query-3375f1beeab7af9a6732d6fce8762c3a3038e1f3.zip |
Merge pull request #37 from drivergroup/add-slot-eligibility-armsv0.8.1
Add slot eligibility arms
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/slotarm/ApiSlotCreateArm.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/slotarm/ApiSlotCreateArm.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/slotarm/ApiSlotCreateArm.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/slotarm/ApiSlotCreateArm.scala new file mode 100644 index 0000000..3e52c13 --- /dev/null +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/slotarm/ApiSlotCreateArm.scala @@ -0,0 +1,20 @@ +package xyz.driver.pdsuidomain.formats.json.slotarm + +import xyz.driver.pdsuicommon.domain.{LongId, StringId} +import xyz.driver.pdsuidomain.entities.SlotArm +import play.api.libs.json.{Format, Json} + +final case class ApiCreateSlotArm(name: String, trialId: String) { + + def toDomain = SlotArm( + id = LongId(0), + name = name, + trialId = StringId(trialId), + originalName = name + ) +} + +object ApiCreateSlotArm { + + implicit val format: Format[ApiCreateSlotArm] = Json.format[ApiCreateSlotArm] +} |