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

/**
 * Optional per-listing patch applied by a bulk-update call.
 * All fields optional; at least one must be set by the caller.
 */
export interface BulkListingPatch {
  priceVND?: bigint;
  status?: ListingStatus;
  /**
   * Featured flag.
   *  - `true` + `featuredDays` > 0 → set featuredUntil = now + days
   *  - `false` → clear featuredUntil
   */
  featured?: boolean;
  featuredDays?: number;
}

export class BulkUpdateListingsCommand {
  constructor(
    public readonly ids: string[],
    public readonly patch: BulkListingPatch,
    public readonly userId: string,
    public readonly userRole: string,
  ) {}
}
