src/Entity/Techcard/ParametersValue.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Techcard;
  3. use App\Entity\Agro\Operation;
  4. use App\Entity\Agro\Parameter;
  5. use App\Repository\Techcard\ParametersValueRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. /**
  9.  * @ORM\Entity(repositoryClass=ParametersValueRepository::class)
  10.  * @UniqueEntity(
  11.  *     fields={"parameter", "techcard"},
  12.  *     errorPath="parameter",
  13.  *     message="The parameter value exists."
  14.  * )
  15.  */
  16. class ParametersValue
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(type="text", nullable=true)
  26.      */
  27.     private $norm;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private $min;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $max;
  36.     /**
  37.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  38.      */
  39.     private $alert;
  40.     /**
  41.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  42.      */
  43.     private $addImage;
  44.     /**
  45.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  46.      */
  47.     private $displayNorm;
  48.     /**
  49.      * @ORM\ManyToOne(targetEntity=Techcard::class, inversedBy="parametersValues")
  50.      */
  51.     private $techcard;
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity=Parameter::class, inversedBy="parametersValues",cascade={"persist","remove"})
  54.      */
  55.     private $parameter;
  56.     /**
  57.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  58.      */
  59.     private $comment;
  60.     /**
  61.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  62.      */
  63.     private $recommendation;
  64.     /**
  65.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  66.      */
  67.     private $ii;
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $model_ii;
  72.   public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     public function getNorm(): ?string
  77.     {
  78.         return $this->norm;
  79.     }
  80.     public function setNorm(?string $norm): self
  81.     {
  82.         $this->norm $norm;
  83.         return $this;
  84.     }
  85.     public function getMin(): ?string
  86.     {
  87.         return $this->min;
  88.     }
  89.     public function setMin(?string $min): self
  90.     {
  91.         $this->min $min;
  92.         return $this;
  93.     }
  94.     public function getMax(): ?string
  95.     {
  96.         return $this->max;
  97.     }
  98.     public function setMax(?string $max): self
  99.     {
  100.         $this->max $max;
  101.         return $this;
  102.     }
  103.     public function getAlert(): ?bool
  104.     {
  105.         return $this->alert;
  106.     }
  107.     public function setAlert(?bool $alert): self
  108.     {
  109.         $this->alert $alert;
  110.         return $this;
  111.     }
  112.     public function getAddImage(): ?bool
  113.     {
  114.         return $this->addImage;
  115.     }
  116.     public function setAddImage(?bool $addImage): self
  117.     {
  118.         $this->addImage $addImage;
  119.         return $this;
  120.     }
  121.     public function getDisplayNorm(): ?bool
  122.     {
  123.         return $this->displayNorm;
  124.     }
  125.     public function setDisplayNorm(?bool $displayNorm): self
  126.     {
  127.         $this->displayNorm $displayNorm;
  128.         return $this;
  129.     }
  130.     public function getTechcard(): ?Techcard
  131.     {
  132.         return $this->techcard;
  133.     }
  134.     public function setTechcard(?Techcard $techcard): self
  135.     {
  136.         $this->techcard $techcard;
  137.         return $this;
  138.     }
  139.     public function getParameter(): ?Parameter
  140.     {
  141.         return $this->parameter;
  142.     }
  143.     public function setParameter(?Parameter $parameter): self
  144.     {
  145.         $this->parameter $parameter;
  146.         return $this;
  147.     }
  148.     public function getComment(): ?bool
  149.     {
  150.         return $this->comment;
  151.     }
  152.     public function setComment(?bool $comment): self
  153.     {
  154.         $this->comment $comment;
  155.         return $this;
  156.     }
  157.     public function __clone()
  158.     {
  159.         $this->id null;
  160.         $this->techcard null;
  161.         $this->parameter null;
  162.     }
  163.     public function isRecommendation(): ?bool
  164.     {
  165.         return $this->recommendation;
  166.     }
  167.     public function setRecommendation(?bool $recommendation): self
  168.     {
  169.         $this->recommendation $recommendation;
  170.         return $this;
  171.     }
  172.     public function isIi(): ?bool
  173.     {
  174.         return $this->ii;
  175.     }
  176.     public function setIi(?bool $ii): self
  177.     {
  178.         $this->ii $ii;
  179.         if($this->ii == false){
  180.             $this->setModelIi(null);
  181.         }
  182.         return $this;
  183.     }
  184.     public function getModelIi(): ?string
  185.     {
  186.         return $this->model_ii;
  187.     }
  188.     public function setModelIi(?string $model_ii): self
  189.     {
  190.         $this->model_ii $model_ii;
  191.         return $this;
  192.     }
  193. }