import type { DomainEvent } from '@modules/shared';

export type PriceChangeSource = 'manual_update' | 'admin_override' | 'market_adjustment';

export class ListingPriceChangedEvent implements DomainEvent {
  readonly eventName = 'listing.price_changed';
  readonly occurredAt = new Date();

  constructor(
    public readonly aggregateId: string,
    public readonly oldPrice: bigint,
    public readonly newPrice: bigint,
    public readonly source: PriceChangeSource = 'manual_update',
  ) {}
}
