ldc-ovoteam/app/Cqs/Queries/Recipes/GetRelatedRecipesQueryInput.php
Jérémy Munsch 6c691f77fc
feat(queries): add new product and recipe queries with inputs
- Implement GetCategoriesProductsQuery and GetCategoriesProductsQueryInput for product category retrieval.
- Implement GetRelatedProductsQuery and GetRelatedProductsQueryInput for related product fetching.
- Implement GetFrontRecipesQuery and GetFrontRecipesQueryInput for front-end recipe listing.
- Implement GetRelatedRecipesQuery and GetRelatedRecipesQueryInput for related recipe fetching.
- Update ProductController and RecipeController to utilize new query classes.
- Enhance IndexProductRequest and IndexRecipeRequest to convert requests to query inputs.
2026-11-05 12:02:36 +01:00

19 lines
417 B
PHP

<?php
declare(strict_types=1);
namespace App\Cqs\Queries\Recipes;
use App\Contracts\QueryInput;
use Domain\Models\ValueObjects\Entities\ProductId;
use Webmozart\Assert\Assert;
final readonly class GetRelatedRecipesQueryInput implements QueryInput
{
public function __construct(
public ProductId $productId,
public int $limit = 10,
) {
Assert::greaterThan($this->limit, 0);
}
}