Pass parts object directly to BulkSearchRequestDTO and added some syntax hints

This commit is contained in:
Jan Böhmer 2025-09-14 22:56:12 +02:00
parent 0e99faee0a
commit 41a7238ab7
5 changed files with 60 additions and 40 deletions

View file

@ -4,11 +4,18 @@ declare(strict_types=1);
namespace App\Services\InfoProviderSystem\DTOs;
class BulkSearchRequestDTO
use App\Entity\Parts\Part;
readonly class BulkSearchRequestDTO
{
/**
* @param array $fieldMappings
* @param bool $prefetchDetails
* @param Part[] $parts The parts for which the bulk search should be performed.
*/
public function __construct(
public readonly array $fieldMappings,
public readonly bool $prefetchDetails = false,
public readonly array $partIds = []
public array $fieldMappings,
public bool $prefetchDetails = false,
public array $parts = []
) {}
}
}