@kerthin/domain
Version:
Kerthin Domain (based on DDD)
19 lines • 597 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AggregateRoot = void 0;
const domain_entity_1 = require("./domain-entity");
const event_1 = require("../event");
class AggregateRoot extends domain_entity_1.DomainEntity {
constructor() {
super(...arguments);
this.domainEvent = new event_1.DomainEvent();
}
addDomainEvent(event) {
this.domainEvent.addEvent(event);
}
clearDomainEvents() {
this.domainEvent.clearEvents();
}
}
exports.AggregateRoot = AggregateRoot;
//# sourceMappingURL=aggregate-root.js.map