diff options
author | vlad <vlad@driver.xyz> | 2017-11-10 00:27:45 -0800 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-11-10 00:27:51 -0800 |
commit | b332943c91cb2cfb415a3b7b682d34fa514e2750 (patch) | |
tree | 55ec9583a624bf005ff3a140d7e52a9d9d78effc /src/main/scala/xyz/driver/pdsuidomain | |
parent | 574cda580870d21de506eecf0ac9dd25bdc4be72 (diff) | |
download | rest-query-0.14.1.tar.gz rest-query-0.14.1.tar.bz2 rest-query-0.14.1.zip |
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain')
3 files changed, 5 insertions, 3 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala index c66048b..cc96cbd 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala @@ -90,4 +90,5 @@ final case class TrialHistory(id: LongId[TrialHistory], trialId: StringId[Trial], state: State, action: Action, - created: LocalDateTime = LocalDateTime.now(ZoneId.of("Z"))) + created: LocalDateTime = LocalDateTime.now(ZoneId.of("Z")), + comment: Option[String] = None) diff --git a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala index 94bc27a..1e4ad51 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/fakes/entities/trialcuration.scala @@ -123,7 +123,8 @@ object trialcuration { trialId = nextStringId[Trial], state = nextTrialState, action = nextTrialAction, - created = nextLocalDateTime + created = nextLocalDateTime, + comment = generators.nextOption(generators.nextString()) ) def nextHypothesis(): Hypothesis = Hypothesis( diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/trialhistory.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/trialhistory.scala index cc01dd1..c8df1d8 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/trialhistory.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/trialhistory.scala @@ -25,6 +25,6 @@ object trialhistory { "Archive" -> Action.Archive ) - implicit val trialHistoryFormat: RootJsonFormat[TrialHistory] = jsonFormat6(TrialHistory.apply) + implicit val trialHistoryFormat: RootJsonFormat[TrialHistory] = jsonFormat7(TrialHistory.apply) } |