20 lines
466 B
TypeScript
20 lines
466 B
TypeScript
import { DomainEvent } from './domain-event.interface';
|
|
|
|
export class PoolInjectedEvent implements DomainEvent {
|
|
readonly type = 'PoolInjected';
|
|
readonly aggregateType = 'PlantingOrder';
|
|
readonly occurredAt: Date;
|
|
|
|
constructor(
|
|
public readonly aggregateId: string,
|
|
public readonly data: {
|
|
orderNo: string;
|
|
userId: string;
|
|
amount: number;
|
|
txHash: string;
|
|
},
|
|
) {
|
|
this.occurredAt = new Date();
|
|
}
|
|
}
|