src/Entity/StoreSpeciality.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Enum\StoreSpecialityEnum;
  4. use App\Repository\StoreSpecialityRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=StoreSpecialityRepository::class)
  8.  */
  9. class StoreSpeciality
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="integer", nullable=true)
  19.      */
  20.     private $value;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getValue(): ?int
  26.     {
  27.         return $this->value;
  28.     }
  29.     public function setValue(?int $value): self
  30.     {
  31.         $this->value $value;
  32.         return $this;
  33.     }
  34.     public function __toString() {
  35.         return StoreSpecialityEnum::getName($this->value);
  36.     }
  37. }