import { type PropertyExtras } from '../create-listing/create-listing.command';

export class UpdateListingCommand {
  constructor(
    public readonly listingId: string,
    public readonly userId: string,
    public readonly title?: string,
    public readonly description?: string,
    public readonly priceVND?: bigint,
    public readonly rentPriceMonthly?: bigint,
    public readonly amenities?: string[],
    public readonly mediaOrder?: { mediaId: string; order: number }[],
    public readonly userRole?: string,
    // Rich property fields bundled so ctor stays compact (all optional).
    public readonly extras?: PropertyExtras,
    /**
     * Optional ownership transfer. `undefined` → no change.
     * `null` → un-assign agent. Any string → reassign to that agent.
     * Permission gate (admin OR current owner-agent) lives in the handler.
     */
    public readonly agentId?: string | null,
  ) {}
}
