blob: ea79b9292d6ed0566d2b5a84ebd2742b79d29b63 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package xyz.driver.pdsuidomain.formats.json
import spray.json._
import xyz.driver.core.json._
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)
}
|