diff --git a/dotnet-templates.sln b/dotnet-templates.sln index 1866c31d7..19e6fc94c 100644 --- a/dotnet-templates.sln +++ b/dotnet-templates.sln @@ -88,6 +88,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fc", "fc", "{4946576F-1558-49ED-A272-6F4D92FB0031}" ProjectSection(SolutionItems) = preProject equinox-fc\.template.config\template.json = equinox-fc\.template.config\template.json + equinox-fc\README.md = equinox-fc\README.md EndProjectSection EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Domain", "equinox-fc\Domain\Domain.fsproj", "{B3CFC965-6AB9-47E8-AA47-548A8D8A2E2C}" diff --git a/equinox-fc/Domain/InventoryTransaction.fs b/equinox-fc/Domain/InventoryTransaction.fs index 25ac55139..6ace7369b 100644 --- a/equinox-fc/Domain/InventoryTransaction.fs +++ b/equinox-fc/Domain/InventoryTransaction.fs @@ -36,17 +36,17 @@ module Events = module Fold = - type Removed = { request : Events.TransferRequested; removed : Events.Removed } - type Added = { request : Events.TransferRequested; removed : Events.Removed; added : Events.Added } type State = | Initial | Adjusting of Events.AdjustmentRequested | Adjusted of Events.AdjustmentRequested | Transferring of Events.TransferRequested - | Failed + | Rejected | Adding of Removed | Added of Added | Completed + and Removed = { request : Events.TransferRequested; removed : Events.Removed } + and Added = { request : Events.TransferRequested; removed : Events.Removed; added : Events.Added } let initial = Initial let evolve state = function | Events.AdjustmentRequested e -> Adjusting e @@ -55,7 +55,7 @@ module Fold = | Adjusting s -> Adjusted s | x -> failwithf "Unexpected %A when %A " ee state | Events.TransferRequested e -> Transferring e - | Events.Failed -> Failed + | Events.Failed -> Rejected | Events.Removed e as ee -> match state with | Transferring s -> Adding { request = s; removed = e }