From 21a5bfcae20dcdda9dbac64dd888e6a584bd3b3d Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Thu, 13 Feb 2020 19:53:48 +0000 Subject: [PATCH] Update to FsCodec 2.0.0-rc3 --- equinox-fc/Domain/Allocation.fs | 5 +++-- equinox-fc/Domain/Allocator.fs | 5 +++-- equinox-fc/Domain/Ticket.fs | 5 +++-- equinox-fc/Domain/TicketList.fs | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/equinox-fc/Domain/Allocation.fs b/equinox-fc/Domain/Allocation.fs index 3cb0caadb..dcfdb2bdc 100644 --- a/equinox-fc/Domain/Allocation.fs +++ b/equinox-fc/Domain/Allocation.fs @@ -3,6 +3,9 @@ module Allocation // NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care module Events = + let [] CategoryId = "Allocation" + let (|For|) id = FsCodec.StreamName.create CategoryId (AllocationId.toString id) + type Commenced = { ticketIds : TicketId[] } type Tickets = { ticketIds : TicketId[] } type Allocated = { ticketIds : TicketId[]; listId : TicketListId } @@ -31,8 +34,6 @@ module Events = | Snapshotted interface TypeShape.UnionContract.IUnionContract let codec = FsCodec.NewtonsoftJson.Codec.Create() - let [] categoryId = "Allocation" - let (|For|) id = Equinox.AggregateId(categoryId, AllocationId.toString id) module Fold = diff --git a/equinox-fc/Domain/Allocator.fs b/equinox-fc/Domain/Allocator.fs index 8c26b54e2..a59c25887 100644 --- a/equinox-fc/Domain/Allocator.fs +++ b/equinox-fc/Domain/Allocator.fs @@ -5,6 +5,9 @@ open System // NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care module Events = + let [] CategoryId = "Allocator" + let (|For|) id = FsCodec.StreamName.create CategoryId (AllocatorId.toString id) + type Commenced = { allocationId : AllocationId; cutoff : DateTimeOffset } type Completed = { allocationId : AllocationId; reason : Reason } and [)>] @@ -15,8 +18,6 @@ module Events = | Completed of Completed interface TypeShape.UnionContract.IUnionContract let codec = FsCodec.NewtonsoftJson.Codec.Create() - let [] category = "Allocator" - let (|For|) id = Equinox.AggregateId(category, AllocatorId.toString id) module Fold = diff --git a/equinox-fc/Domain/Ticket.fs b/equinox-fc/Domain/Ticket.fs index 905b989ba..6935c9fb1 100644 --- a/equinox-fc/Domain/Ticket.fs +++ b/equinox-fc/Domain/Ticket.fs @@ -3,6 +3,9 @@ module Ticket // NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care module Events = + let [] CategoryId = "Ticket" + let (|For|) id = FsCodec.StreamName.create CategoryId (TicketId.toString id) + type Reserved = { allocatorId : AllocatorId } type Allocated = { allocatorId : AllocatorId; listId : TicketListId } @@ -12,8 +15,6 @@ module Events = | Revoked interface TypeShape.UnionContract.IUnionContract let codec = FsCodec.NewtonsoftJson.Codec.Create() - let [] category = "Ticket" - let (|For|) id = Equinox.AggregateId(category, TicketId.toString id) module Fold = diff --git a/equinox-fc/Domain/TicketList.fs b/equinox-fc/Domain/TicketList.fs index 2905e7392..50b78f0eb 100644 --- a/equinox-fc/Domain/TicketList.fs +++ b/equinox-fc/Domain/TicketList.fs @@ -3,6 +3,9 @@ module TicketList // NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care module Events = + let [] CategoryId = "TicketList" + let (|For|) id = FsCodec.StreamName.create CategoryId (TicketListId.toString id) + type Allocated = { allocatorId : AllocatorId; ticketIds : TicketId[] } type Snapshotted = { ticketIds : TicketId[] } type Event = @@ -10,8 +13,6 @@ module Events = | Snapshotted of Snapshotted interface TypeShape.UnionContract.IUnionContract let codec = FsCodec.NewtonsoftJson.Codec.Create() - let [] categoryId = "TicketList" - let (|For|) id = Equinox.AggregateId(categoryId, TicketListId.toString id) module Fold =