File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ module Allocation
33// NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care
44module Events =
55
6+ let [<Literal>] CategoryId = " Allocation"
7+ let (| For |) id = FsCodec.StreamName.create CategoryId ( AllocationId.toString id)
8+
69 type Commenced = { ticketIds : TicketId [] }
710 type Tickets = { ticketIds : TicketId [] }
811 type Allocated = { ticketIds : TicketId []; listId : TicketListId }
@@ -31,8 +34,6 @@ module Events =
3134 | Snapshotted
3235 interface TypeShape.UnionContract.IUnionContract
3336 let codec = FsCodec.NewtonsoftJson.Codec.Create< Event>()
34- let [<Literal>] categoryId = " Allocation"
35- let (| For |) id = Equinox.AggregateId( categoryId, AllocationId.toString id)
3637
3738module Fold =
3839
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ open System
55// NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care
66module Events =
77
8+ let [<Literal>] CategoryId = " Allocator"
9+ let (| For |) id = FsCodec.StreamName.create CategoryId ( AllocatorId.toString id)
10+
811 type Commenced = { allocationId : AllocationId ; cutoff : DateTimeOffset }
912 type Completed = { allocationId : AllocationId ; reason : Reason }
1013 and [<Newtonsoft.Json.JsonConverter(typeof<FsCodec.NewtonsoftJson.TypeSafeEnumConverter>)>]
@@ -15,8 +18,6 @@ module Events =
1518 | Completed of Completed
1619 interface TypeShape.UnionContract.IUnionContract
1720 let codec = FsCodec.NewtonsoftJson.Codec.Create< Event>()
18- let [<Literal>] category = " Allocator"
19- let (| For |) id = Equinox.AggregateId( category, AllocatorId.toString id)
2021
2122module Fold =
2223
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ module Ticket
33// NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care
44module Events =
55
6+ let [<Literal>] CategoryId = " Ticket"
7+ let (| For |) id = FsCodec.StreamName.create CategoryId ( TicketId.toString id)
8+
69 type Reserved = { allocatorId : AllocatorId }
710 type Allocated = { allocatorId : AllocatorId ; listId : TicketListId }
811
@@ -12,8 +15,6 @@ module Events =
1215 | Revoked
1316 interface TypeShape.UnionContract.IUnionContract
1417 let codec = FsCodec.NewtonsoftJson.Codec.Create< Event>()
15- let [<Literal>] category = " Ticket"
16- let (| For |) id = Equinox.AggregateId( category, TicketId.toString id)
1718
1819module Fold =
1920
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ module TicketList
33// NOTE - these types and the union case names reflect the actual storage formats and hence need to be versioned with care
44module Events =
55
6+ let [<Literal>] CategoryId = " TicketList"
7+ let (| For |) id = FsCodec.StreamName.create CategoryId ( TicketListId.toString id)
8+
69 type Allocated = { allocatorId : AllocatorId ; ticketIds : TicketId [] }
710 type Snapshotted = { ticketIds : TicketId [] }
811 type Event =
912 | Allocated of Allocated
1013 | Snapshotted of Snapshotted
1114 interface TypeShape.UnionContract.IUnionContract
1215 let codec = FsCodec.NewtonsoftJson.Codec.Create< Event>()
13- let [<Literal>] categoryId = " TicketList"
14- let (| For |) id = Equinox.AggregateId( categoryId, TicketListId.toString id)
1516
1617module Fold =
1718
You can’t perform that action at this time.
0 commit comments