src/Entity/Permission.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\PermissionRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassPermissionRepository::class)]
  8. #[ApiResource()]
  9. class Permission
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     #[Groups(['role:get','admin:read'])]
  15.     private $id;
  16.     #[ORM\Column(type'string'length80)]
  17.     #[Groups(['role:get','admin:read'])]
  18.     private $label;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getLabel(): ?string
  24.     {
  25.         return $this->label;
  26.     }
  27.     public function setLabel(string $label): self
  28.     {
  29.         $this->label $label;
  30.         return $this;
  31.     }
  32. }