- Refactor Bo\ProductsController to use ActionExecutor and Queries - Refactor Fo\Pages\ProductsController and Fo\Ajax\ProductsController to CQS - Add Actions: CreateProduct, UpdateProduct, DeleteProduct with Inputs - Add Queries: GetBoPaginatedProductsQuery, GetProductFormDataQuery, GetFoProductIndexPageQuery, GetFoFilteredProductsQuery - Add DTOs: ProductFormDataDto and enrich ProductDto - Encapsulate Action/Query inputs conversion in FormRequests - Remove obsolete ProductDirectory and EloquentProductDirectory - Add tests for Fo\Ajax\ProductsController
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Dto;
|
|
|
|
use Domain\Enums\ProductBrand;
|
|
use Domain\Enums\SellUnit;
|
|
use Domain\Enums\TaxRate;
|
|
use Domain\Enums\Units\InvoicingUnit;
|
|
use Domain\Enums\Units\OrderUnit;
|
|
use Illuminate\Support\Collection;
|
|
|
|
final readonly class ProductFormDataDto
|
|
{
|
|
/**
|
|
* @param list<ProductBrand> $brands
|
|
* @param list<TaxRate> $taxes
|
|
* @param list<InvoicingUnit> $invoicingUnits
|
|
* @param list<SellUnit> $sellUnits
|
|
* @param list<OrderUnit> $orderUnits
|
|
* @param Collection<int|string, mixed> $ranges
|
|
* @param Collection<int, TagDto> $tags
|
|
* @param Collection<int, ProductDto> $existingProds
|
|
* @param Collection<int, ProductDto> $selectedProds
|
|
*/
|
|
public function __construct(
|
|
public array $brands,
|
|
public array $taxes,
|
|
public array $invoicingUnits,
|
|
public array $sellUnits,
|
|
public array $orderUnits,
|
|
public Collection $ranges,
|
|
public Collection $tags,
|
|
public Collection $existingProds,
|
|
public Collection $selectedProds,
|
|
) {
|
|
}
|
|
}
|