feat: add epoch event stream to aggregate id

This commit is contained in:
2025-08-12 05:07:16 +02:00
parent d3b08b0caa
commit 393afd58d6
16 changed files with 34 additions and 72 deletions

View File

@@ -19,6 +19,7 @@ export function makeAggregateReducer<
},
reduce(events: TEventFactory["$events"][number]["$record"][], snapshot?: Unknown) {
const instance = aggregate.from(store, snapshot);
instance.id = events[0].stream;
for (const event of events) {
instance.with(event);
}