src/Entity/User/Strate.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\User;
  3. use App\Repository\User\StrateRepository;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Serializer\Annotation\SerializedName;
  8. /**
  9.  * @ORM\Entity(repositoryClass=StrateRepository::class)
  10.  * @ApiResource(
  11.  *     collectionOperations={
  12.  *          "get",
  13.  *     },
  14.  * )
  15.  */
  16. class Strate
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      * @Groups({"User:io"})
  23.      */
  24.     private $id;
  25.     /**
  26.      * @ORM\Column(type="string", length=255)
  27.      * @Groups({"User:io"})
  28.      */
  29.     private $label;
  30.     /**
  31.      * @ORM\Column(type="integer", nullable=true)
  32.      * @SerializedName("nb_to_reach")
  33.      * @Groups({"User:io"})
  34.      */
  35.     private $nbToReach;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getLabel(): ?string
  41.     {
  42.         return $this->label;
  43.     }
  44.     public function setLabel(string $label): self
  45.     {
  46.         $this->label $label;
  47.         return $this;
  48.     }
  49.     public function getNbToReach(): ?int
  50.     {
  51.         return $this->nbToReach;
  52.     }
  53.     public function setNbToReach(?int $nbToReach): self
  54.     {
  55.         $this->nbToReach $nbToReach;
  56.         return $this;
  57.     }
  58. }