10 lines
249 B
TypeScript
10 lines
249 B
TypeScript
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>;
|
|
} |