import { DomainEvent } from './domain-event.interface';
import { FundAllocationDTO } from '../value-objects/fund-allocation.vo';

export class FundsAllocatedEvent implements DomainEvent {
  readonly type = 'FundsAllocated';
  readonly aggregateType = 'PlantingOrder';
  readonly occurredAt: Date;

  constructor(
    public readonly aggregateId: string,
    public readonly data: {
      orderNo: string;
      allocations: FundAllocationDTO[];
    },
  ) {
    this.occurredAt = new Date();
  }
}
