- Implemented Create and Edit pages for products with forms. - Added validation and permissions handling for product actions. - Introduced new product model and related types for better structure. - Enhanced sidebar registry to remove auth dependency for link resolution. - Updated routes to handle precognitive requests for product forms.
35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Domain\Models\Entities;
|
|
|
|
use Domain\Models\ValueObjects\Products\NutritionalValues;
|
|
use Domain\Models\ValueObjects\Products\ProductCategory;
|
|
use Domain\Models\ValueObjects\Products\Technology;
|
|
|
|
class Product
|
|
{
|
|
public function __construct(
|
|
public readonly string $id,
|
|
public string $name,
|
|
public ProductCategory $category,
|
|
public Technology $technology,
|
|
public bool $isEgalim,
|
|
/** @var \Domain\Models\ValueObjects\Products\BreedingMethod[] */
|
|
public array $breedingMethods,
|
|
/** @var \Domain\Models\ValueObjects\Products\Business[] */
|
|
public array $businesses,
|
|
public string $detailsAndAdvantages,
|
|
/** @var \Domain\Models\ValueObjects\Products\ProductFormat[] */
|
|
public array $formats,
|
|
public string $handlingAdvices,
|
|
public string $conservationBeforeOpening,
|
|
public ?string $conservationAfterOpening = null,
|
|
public ?NutritionalValues $nutritionalValues = null,
|
|
public ?string $pdfFilePath = null,
|
|
/** @var Recipe[] */
|
|
public array $associatedRecipes = [],
|
|
) {
|
|
}
|
|
}
|