WIP
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export abstract class AggregateRoot {
|
||||
private _domainEvents: any[] = [];
|
||||
|
||||
protected addDomainEvent(event: any): void {
|
||||
this._domainEvents.push(event);
|
||||
}
|
||||
|
||||
public get domainEvents(): any[] {
|
||||
return [...this._domainEvents];
|
||||
}
|
||||
|
||||
public clearDomainEvents(): void {
|
||||
this._domainEvents = [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user