diff options
Diffstat (limited to 'src/main/scala/xyz')
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) } |