AbstractAggregate
To implement an aggregate, it will be easier to extend AbstractAggregate
and inherit the following properties and methods:
get id(): number|string
- unique aggregate IDget version(): number
- current aggregate versionget changes(): object[]
- events, emitted by aggregate command handlersconstructor({ id, [events], [state] })
handle(command): void|Promise<void>