keiro-dsl-0.26.0.0: test/conformance-intake-delegated-noop/Generated/DeliveryOutcomes/DeliveryStatus/Domain.hs
{-# LANGUAGE TemplateHaskell #-}
-- @generated by keiro-dsl 0.26.0.0 (language keiro-dsl 6) from aggregate DeliveryStatus; do not edit.
module Generated.DeliveryOutcomes.DeliveryStatus.Domain where
import Data.Proxy (Proxy (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Keiki.Core (RegFile (..))
import Keiki.Generics.TH (deriveAggregateCtorsAll, deriveWireCtorsAll)
data DeliveryStatusVertex = DeliveryStatusPending | DeliveryStatusDelivered
deriving stock (Generic, Eq, Ord, Show, Enum, Bounded)
data RecordOutcomeData = RecordOutcomeData
{ outcome :: !Text
}
deriving stock (Generic, Eq, Show)
data DeliveryStatusCommand = RecordOutcome !RecordOutcomeData
deriving stock (Generic, Eq, Show)
data OutcomeRecordedData = OutcomeRecordedData
{ outcome :: !Text
}
deriving stock (Generic, Eq, Show)
data DeliveryStatusEvent = OutcomeRecorded !OutcomeRecordedData
deriving stock (Generic, Eq, Show)
type DeliveryStatusRegs =
'[ '("finalOutcome", Text)
]
initialDeliveryStatusRegs :: RegFile DeliveryStatusRegs
initialDeliveryStatusRegs =
RCons (Proxy @"finalOutcome") "none" RNil
$(deriveAggregateCtorsAll ''DeliveryStatusCommand ''DeliveryStatusRegs)
$(deriveWireCtorsAll ''DeliveryStatusEvent)