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