src/Entity/ShopSetting.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ShopSettingRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ShopSettingRepository::class)
  8.  */
  9. class ShopSetting
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="text")
  19.      */
  20.     private $value;
  21.     /**
  22.      * @ORM\Column(type="text", nullable=true)
  23.      */
  24.     private $url;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Shop::class, inversedBy="settings")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $shop;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=Setting::class)
  32.      * @ORM\JoinColumn(nullable=false)
  33.      * @ORM\OrderBy({"name" = "ASC"})
  34.      */
  35.     private $setting;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getValue(): ?string
  41.     {
  42.         if($this->value=='false') {
  43.             $this->value=false;
  44.         }
  45.         if($this->value=='true') {
  46.             $this->value=true;
  47.         }
  48.         return $this->value;
  49.     }
  50.     public function setValue(string $value): self
  51.     {
  52.         $this->value $value;
  53.         return $this;
  54.     }
  55.     public function getUrl(): ?string
  56.     {
  57.         return $this->url;
  58.     }
  59.     public function setUrl$url): self
  60.     {
  61.         $this->url $url;
  62.         return $this;
  63.     }
  64.     public function getShop(): ?Shop
  65.     {
  66.         return $this->shop;
  67.     }
  68.     public function setShop(?Shop $shop): self
  69.     {
  70.         $this->shop $shop;
  71.         return $this;
  72.     }
  73.     public function getSetting(): ?Setting
  74.     {
  75.         return $this->setting;
  76.     }
  77.     public function setSetting(?Setting $setting): self
  78.     {
  79.         $this->setting $setting;
  80.         return $this;
  81.     }
  82. }