{-# LANGUAGE TemplateHaskell #-}
module Persistence.Schema.ConsistencyStatusType where

import Database.Persist.TH

-- "Contradictory" and "Open" are only used on OMS while the other two can be
-- used on ConsistencyCheckAttempt. "Contradictory" is used when there are some
-- ConsistencyCheckAttempts with "Consistent" and some with "Inconsistent".
-- "Open" is used when there are no ConsistencyCheckAttempts.
data ConsistencyStatusType = Open
                           | Timeout
                           | Error
                           | Consistent
                           | Inconsistent
                           | Contradictory
                             deriving (Int -> ConsistencyStatusType -> ShowS
[ConsistencyStatusType] -> ShowS
ConsistencyStatusType -> String
(Int -> ConsistencyStatusType -> ShowS)
-> (ConsistencyStatusType -> String)
-> ([ConsistencyStatusType] -> ShowS)
-> Show ConsistencyStatusType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConsistencyStatusType] -> ShowS
$cshowList :: [ConsistencyStatusType] -> ShowS
show :: ConsistencyStatusType -> String
$cshow :: ConsistencyStatusType -> String
showsPrec :: Int -> ConsistencyStatusType -> ShowS
$cshowsPrec :: Int -> ConsistencyStatusType -> ShowS
Show, ReadPrec [ConsistencyStatusType]
ReadPrec ConsistencyStatusType
Int -> ReadS ConsistencyStatusType
ReadS [ConsistencyStatusType]
(Int -> ReadS ConsistencyStatusType)
-> ReadS [ConsistencyStatusType]
-> ReadPrec ConsistencyStatusType
-> ReadPrec [ConsistencyStatusType]
-> Read ConsistencyStatusType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConsistencyStatusType]
$creadListPrec :: ReadPrec [ConsistencyStatusType]
readPrec :: ReadPrec ConsistencyStatusType
$creadPrec :: ReadPrec ConsistencyStatusType
readList :: ReadS [ConsistencyStatusType]
$creadList :: ReadS [ConsistencyStatusType]
readsPrec :: Int -> ReadS ConsistencyStatusType
$creadsPrec :: Int -> ReadS ConsistencyStatusType
Read, ConsistencyStatusType -> ConsistencyStatusType -> Bool
(ConsistencyStatusType -> ConsistencyStatusType -> Bool)
-> (ConsistencyStatusType -> ConsistencyStatusType -> Bool)
-> Eq ConsistencyStatusType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConsistencyStatusType -> ConsistencyStatusType -> Bool
$c/= :: ConsistencyStatusType -> ConsistencyStatusType -> Bool
== :: ConsistencyStatusType -> ConsistencyStatusType -> Bool
$c== :: ConsistencyStatusType -> ConsistencyStatusType -> Bool
Eq)
derivePersistField "ConsistencyStatusType"