src/Entity/StoreService.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Enum\StoreServiceEnum;
  4. use App\Repository\StoreServiceRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=StoreServiceRepository::class)
  8.  */
  9. class StoreService
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $value;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $iconName;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getValue(): ?int
  30.     {
  31.         return $this->value;
  32.     }
  33.     public function setValue(int $value): self
  34.     {
  35.         $this->value $value;
  36.         return $this;
  37.     }
  38.     public function __toString() {
  39.         return StoreServiceEnum::getName($this->value);
  40.     }
  41.     public function getIconName(): ?string
  42.     {
  43.         return $this->iconName;
  44.     }
  45.     public function setIconName(string $iconName): self
  46.     {
  47.         $this->iconName $iconName;
  48.         return $this;
  49.     }
  50. }