src/Domain/Entity/PointOfInterestGps.php line 23

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Domain\Entity;
  4. use ApiPlatform\Metadata\ApiProperty;
  5. use ApiPlatform\Metadata\ApiResource;
  6. use ApiPlatform\Metadata\Post;
  7. use App\Application\ApiResources\State\Processor\PointOfInterestGps\CreateProcessor;
  8. use App\Domain\Entity\PointOfInterest\Revision;
  9. #[ApiResource(
  10.     operations            : [
  11.         new Post(
  12.             security "is_granted('ROLE_ADMIN')",
  13.             processorCreateProcessor::class,
  14.         ),
  15.     ],
  16.     normalizationContext  : ['groups' => ['point_of_interest_gps_read']],
  17.     denormalizationContext: ['groups' => ['point_of_interest_gps_write']]
  18. )]
  19. class PointOfInterestGps
  20. {
  21.     /** @var integer|null */
  22.     #[ApiProperty(identifiertrue)]
  23.     public ?int $id null;
  24.     public function __construct(
  25.         public Revision $revision1,
  26.         public Revision $revision2,
  27.         public bool $isSolved false,
  28.     ) {
  29.     }
  30. }