keiro-dsl-0.17.0.0: test/conformance-process-reactions/Generated/ProcessReactions/IncidentSaga/Domain.hs
{-# LANGUAGE TemplateHaskell #-}
-- @generated by keiro-dsl 0.17.0.0 (language keiro-dsl 6) from aggregate IncidentSaga; do not edit.
module Generated.ProcessReactions.IncidentSaga.Domain where
import GHC.Generics (Generic)
import Keiki.Core (RegFile (..))
import Generated.ProcessReactions.Nominals (IncidentId)
import Keiki.Generics.TH (deriveAggregateCtorsAll, deriveWireCtorsAll)
data IncidentSagaVertex = IncidentSagaOpen
deriving stock (Generic, Eq, Ord, Show, Enum, Bounded)
data RecordCriticalData = RecordCriticalData
{ incidentId :: !IncidentId
}
deriving stock (Generic, Eq, Show)
data RecordRoutineData = RecordRoutineData
{ incidentId :: !IncidentId
}
deriving stock (Generic, Eq, Show)
data IncidentSagaCommand = RecordCritical !RecordCriticalData
| RecordRoutine !RecordRoutineData
deriving stock (Generic, Eq, Show)
data CriticalRecordedData = CriticalRecordedData
{ incidentId :: !IncidentId
}
deriving stock (Generic, Eq, Show)
data RoutineRecordedData = RoutineRecordedData
{ incidentId :: !IncidentId
}
deriving stock (Generic, Eq, Show)
data IncidentSagaEvent = CriticalRecorded !CriticalRecordedData
| RoutineRecorded !RoutineRecordedData
deriving stock (Generic, Eq, Show)
type IncidentSagaRegs =
'[]
initialIncidentSagaRegs :: RegFile IncidentSagaRegs
initialIncidentSagaRegs =
RNil
$(deriveAggregateCtorsAll ''IncidentSagaCommand ''IncidentSagaRegs)
$(deriveWireCtorsAll ''IncidentSagaEvent)