diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala | 32 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/trialhistory.scala | 10 |
2 files changed, 25 insertions, 17 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala index cc96cbd..9210742 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/TrialHistory.scala @@ -17,25 +17,31 @@ object TrialHistory { sealed trait State object State { - case object Summarize extends State - case object Criteriarize extends State - case object Review extends State - case object Flag extends State + case object Summarize extends State + case object Criteriarize extends State + case object Review extends State + case object ReviewSummary extends State + case object ReviewCriteria extends State + case object Flag extends State - val All: Set[State] = Set[State](Summarize, Criteriarize, Review, Flag) + val All: Set[State] = Set[State](Summarize, Criteriarize, Review, ReviewSummary, ReviewCriteria, Flag) val fromString: PartialFunction[String, State] = { - case "Summarize" => State.Summarize - case "Criteriarize" => State.Criteriarize - case "Review" => State.Review - case "Flag" => State.Flag + case "Summarize" => State.Summarize + case "Criteriarize" => State.Criteriarize + case "Review" => State.Review + case "ReviewSummary" => State.ReviewSummary + case "ReviewCriteria" => State.ReviewCriteria + case "Flag" => State.Flag } def stateToString(x: State): String = x match { - case State.Summarize => "Summarize" - case State.Criteriarize => "Criteriarize" - case State.Review => "Review" - case State.Flag => "Flag" + case State.Summarize => "Summarize" + case State.Criteriarize => "Criteriarize" + case State.Review => "Review" + case State.ReviewSummary => "ReviewSummary" + case State.ReviewCriteria => "ReviewCriteria" + case State.Flag => "Flag" } implicit def toPhiString(x: State): PhiString = 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 c8df1d8..f71ec12 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/trialhistory.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/trialhistory.scala @@ -10,10 +10,12 @@ object trialhistory { import common._ implicit val trialStateFormat = new EnumJsonFormat[State]( - "Summarize" -> State.Summarize, - "Criteriarize" -> State.Criteriarize, - "Review" -> State.Review, - "Flag" -> State.Flag + "Summarize" -> State.Summarize, + "Criteriarize" -> State.Criteriarize, + "Review" -> State.Review, + "ReviewSummary" -> State.ReviewSummary, + "ReviewCriteria" -> State.ReviewCriteria, + "Flag" -> State.Flag ) implicit val trialActionFormat = new EnumJsonFormat[Action]( |