src/Entity/Role.php line 22

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use App\Entity\Mapped\NamedEntity;
  6. use App\Repository\RoleRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(
  9.     repositoryClassRoleRepository::class
  10. )]
  11. #[ORM\Table(
  12.     name'role'
  13. )]
  14. #[ApiResource(
  15.     collectionOperations: [],
  16.     itemOperations: []
  17. )]
  18. class Role extends NamedEntity
  19. {
  20.     #[ORM\Column(
  21.         name'key_name',
  22.         type'string',
  23.         length181,
  24.         nullabletrue
  25.     )]
  26.     private ?string $keyName null;
  27.     public function getKeyName(): ?string
  28.     {
  29.         return $this->keyName;
  30.     }
  31.     public function setKeyName(?string $keyName): self
  32.     {
  33.         $this->keyName $keyName;
  34.         return $this;
  35.     }
  36. }