refactor
This commit is contained in:
10
core/shared/domain/DomainEvent.ts
Normal file
10
core/shared/domain/DomainEvent.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface DomainEvent<T = unknown> {
|
||||
readonly eventType: string;
|
||||
readonly aggregateId: string;
|
||||
readonly eventData: T;
|
||||
readonly occurredAt: Date;
|
||||
}
|
||||
|
||||
export interface DomainEventPublisher {
|
||||
publish(event: DomainEvent): Promise<void>;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
export interface IDomainEvent<T = any> {
|
||||
readonly eventType: string;
|
||||
readonly aggregateId: string;
|
||||
readonly eventData: T;
|
||||
readonly occurredAt: Date;
|
||||
}
|
||||
|
||||
export interface IDomainEventPublisher {
|
||||
publish(event: IDomainEvent): Promise<void>;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Result } from '../result/Result';
|
||||
import type { Result } from '../application/Result';
|
||||
import type { IDomainError } from '../errors/DomainError';
|
||||
|
||||
export interface IDomainService {
|
||||
|
||||
Reference in New Issue
Block a user