src/Entity/Config.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ConfigRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ConfigRepository::class)
  8.  */
  9. class Config
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      * @Assert\NotBlank
  20.      */
  21.     private $field;
  22.     /**
  23.      * @ORM\Column(type="json", nullable=true)
  24.      * @Assert\Type("array")
  25.      */
  26.     private $value;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="App\Entity\Company")
  29.      */
  30.     private $company;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getField(): ?string
  36.     {
  37.         return $this->field;
  38.     }
  39.     public function setField(string $field): self
  40.     {
  41.         $this->field = $field;
  42.         return $this;
  43.     }
  44.     public function getValue(): ?array
  45.     {
  46.         return $this->value;
  47.     }
  48.     public function setValue(?array $value): self
  49.     {
  50.         $this->value = $value;
  51.         return $this;
  52.     }
  53.     public function getCompany(): ?Company
  54.     {
  55.         return $this->company;
  56.     }
  57.     public function setCompany(?Company $company): self
  58.     {
  59.         $this->company = $company;
  60.         return $this;
  61.     }
  62. }