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