This commit is contained in:
adlerhurst
2020-11-25 20:04:32 +01:00
parent f6cdcee77a
commit 4bb9650f27
32 changed files with 1070 additions and 215 deletions
+10 -5
View File
@@ -17,9 +17,6 @@ const (
type Aggregate struct {
eventstore.Aggregate
// SetUpStarted Step
// SetUpDone Step
}
func NewAggregate(
@@ -54,8 +51,6 @@ func AggregateFromReadModel(rm *ReadModel) *Aggregate {
AggregateVersion,
rm.ProcessedSequence,
),
// SetUpDone: rm.SetUpDone,
// SetUpStarted: rm.SetUpStarted,
}
}
@@ -82,3 +77,13 @@ func (a *Aggregate) PushMemberRemoved(ctx context.Context, userID string) *Aggre
a.Aggregate = *a.PushEvents(NewMemberRemovedEvent(ctx, userID))
return a
}
func (a *Aggregate) PushStepStarted(ctx context.Context, step Step) *Aggregate {
a.Aggregate = *a.PushEvents(NewSetupStepStartedEvent(ctx, step))
return a
}
func (a *Aggregate) PushStepDone(ctx context.Context, step Step) *Aggregate {
a.Aggregate = *a.PushEvents(NewSetupStepDoneEvent(ctx, step))
return a
}