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

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

  constructor(
    public readonly aggregateId: string,
    public readonly propertyId: string,
    public readonly sellerId: string,
    public readonly previousStatus: ListingStatus,
    public readonly newStatus: ListingStatus,
    public readonly updatedFields: string[],
  ) {}
}
