import { DomainEvent } from '../../../domain/events/domain-event.interface';

export class PrePlantingPortionPurchasedEvent implements DomainEvent {
  readonly type = 'PrePlantingPortionPurchased';
  readonly aggregateType = 'PrePlantingOrder';
  readonly occurredAt: Date;

  constructor(
    public readonly aggregateId: string,
    public readonly data: {
      orderNo: string;
      userId: string;
      accountSequence: string;
      portionCount: number;
      totalAmount: number;
      provinceCode: string;
      cityCode: string;
      totalPortionsAfter: number;
      availablePortionsAfter: number;
    },
  ) {
    this.occurredAt = new Date();
  }
}
