try with writemodel

This commit is contained in:
adlerhurst
2020-11-18 21:22:15 +01:00
parent 147782332f
commit 4d6497f6c1
12 changed files with 232 additions and 67 deletions
+5 -3
View File
@@ -9,8 +9,10 @@ type Aggregate struct {
Roles []string
}
func NewMemberAggregate(userID string) *ReadModel {
return &ReadModel{
ReadModel: *eventstore.NewReadModel(),
func NewAggregate(aggregate *eventstore.Aggregate, userID string, roles ...string) *Aggregate {
return &Aggregate{
Aggregate: *aggregate,
Roles: roles,
UserID: userID,
}
}