<?php
declare(strict_types=1);
namespace App\Domain\Entity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Post;
use App\Application\ApiResources\State\Processor\PointOfInterestGps\CreateProcessor;
use App\Domain\Entity\PointOfInterest\Revision;
#[ApiResource(
operations : [
new Post(
security : "is_granted('ROLE_ADMIN')",
processor: CreateProcessor::class,
),
],
normalizationContext : ['groups' => ['point_of_interest_gps_read']],
denormalizationContext: ['groups' => ['point_of_interest_gps_write']]
)]
class PointOfInterestGps
{
/** @var integer|null */
#[ApiProperty(identifier: true)]
public ?int $id = null;
public function __construct(
public Revision $revision1,
public Revision $revision2,
public bool $isSolved = false,
) {
}
}