<?php
namespace App\Domain\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Domain\Entity\Behavior\Identifiable;
use App\Domain\Entity\Enumeration\CamperVanBrand;
use App\Domain\Entity\Enumeration\CamperVanOwnershipType;
use App\Domain\Entity\Enumeration\CamperVanType;
/**
* Class CamperVan
*
* @package App\Domain\Entity
*/
#[ApiResource(
operations : [
new Get(),
new GetCollection(),
],
normalizationContext : ['groups' => ['camper_van_read']],
denormalizationContext: ['groups' => ['camper_van_write']]
)]
class CamperVan
{
use Identifiable;
/**
* CamperVan constructor.
*
* @param Media|null $picture
* @param string|null $year
* @param CamperVanBrand|null $brand
* @param CamperVanType|null $type
* @param CamperVanOwnershipType|null $ownership
* @param string|null $model
*/
public function __construct(
public ?Media $picture = null,
public ?string $year = null,
public ?CamperVanBrand $brand = null,
public ?CamperVanType $type = null,
public ?CamperVanOwnershipType $ownership = null,
public ?string $model = null,
) {}
}