aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/documenthistory.scala
diff options
context:
space:
mode:
authorKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-20 16:25:04 +0700
committerKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-20 16:25:04 +0700
commit54b15dae509212f6661dc1f1bc4ca248cb487443 (patch)
tree85b1ceafd9a56da511513797bd263977f52b556c /src/main/scala/xyz/driver/pdsuidomain/formats/json/documenthistory.scala
parent6d6e732368e97e319653f00e498189afceeb4671 (diff)
downloadrest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.gz
rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.bz2
rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.zip
PDSUI-2336 Deleted api classes of play format, userhistory and message services
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/documenthistory.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/documenthistory.scala29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/documenthistory.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/documenthistory.scala
new file mode 100644
index 0000000..a0eb3f5
--- /dev/null
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/documenthistory.scala
@@ -0,0 +1,29 @@
+package xyz.driver.pdsuidomain.formats.json
+
+import spray.json._
+import xyz.driver.core.json.EnumJsonFormat
+import xyz.driver.pdsuidomain.entities._
+
+object documenthistory {
+ import DefaultJsonProtocol._
+ import DocumentHistory._
+ import common._
+
+ implicit val documentStateFormat = new EnumJsonFormat[State](
+ "Extract" -> State.Extract,
+ "Review" -> State.Review,
+ "Flag" -> State.Flag
+ )
+
+ implicit val documentActionFormat = new EnumJsonFormat[Action](
+ "Start" -> Action.Start,
+ "Submit" -> Action.Submit,
+ "Unassign" -> Action.Unassign,
+ "Resolve" -> Action.Resolve,
+ "Flag" -> Action.Flag,
+ "Archive" -> Action.Archive
+ )
+
+ implicit val documentHistoryFormat: RootJsonFormat[DocumentHistory] = jsonFormat6(DocumentHistory.apply)
+
+}