src/Entity/Variables.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VariablesRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassVariablesRepository::class)]
  8. class Variables
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column()]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $nom null;
  16.     #[ORM\Column(length20)]
  17.     private ?string $code null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $description null;
  20.     #[ORM\ManyToOne(inversedBy'variables')]
  21.     private ?Categories $Categorie null;
  22.     #[ORM\Column]
  23.     private ?int $status null;
  24.     #[ORM\Column(length100nullabletrue)]
  25.     private ?string $typehtml null;
  26.     #[ORM\OneToMany(mappedBy'variable'targetEntityVariableConstants::class)]
  27.     private Collection $variableConstants;
  28.     #[ORM\OneToMany(mappedBy'variable'targetEntityVehiculeVariable::class)]
  29.     private Collection $vehicule;
  30.     public function __construct()
  31.     {
  32.         $this->variableConstants = new ArrayCollection();
  33.         $this->vehicule = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getNom(): ?string
  40.     {
  41.         return $this->nom;
  42.     }
  43.     public function setNom(string $nom): self
  44.     {
  45.         $this->nom $nom;
  46.         return $this;
  47.     }
  48.     public function getCode(): ?string
  49.     {
  50.         return $this->code;
  51.     }
  52.     public function setCode(string $code): self
  53.     {
  54.         $this->code $code;
  55.         return $this;
  56.     }
  57.     public function getDescription(): ?string
  58.     {
  59.         return $this->description;
  60.     }
  61.     public function setDescription(?string $description): self
  62.     {
  63.         $this->description $description;
  64.         return $this;
  65.     }
  66.     public function getCategorie(): ?Categories
  67.     {
  68.         return $this->Categorie;
  69.     }
  70.     public function setCategorie(?Categories $Categorie): self
  71.     {
  72.         $this->Categorie $Categorie;
  73.         return $this;
  74.     }
  75.     public function getStatus(): ?int
  76.     {
  77.         return $this->status;
  78.     }
  79.     public function setStatus(int $status): self
  80.     {
  81.         $this->status $status;
  82.         return $this;
  83.     }
  84.     public function getTypehtml(): ?string
  85.     {
  86.         return $this->typehtml;
  87.     }
  88.     public function setTypehtml(?string $typehtml): self
  89.     {
  90.         $this->typehtml $typehtml;
  91.         return $this;
  92.     }
  93.     /**
  94.      * @return Collection<int, VariableConstants>
  95.      */
  96.     public function getVariableConstants(): Collection
  97.     {
  98.         return $this->variableConstants;
  99.     }
  100.     public function addVariableConstant(VariableConstants $variableConstant): self
  101.     {
  102.         if (!$this->variableConstants->contains($variableConstant)) {
  103.             $this->variableConstants[] = $variableConstant;
  104.             $variableConstant->setVariable($this);
  105.         }
  106.         return $this;
  107.     }
  108.     public function removeVariableConstant(VariableConstants $variableConstant): self
  109.     {
  110.         if ($this->variableConstants->removeElement($variableConstant)) {
  111.             // set the owning side to null (unless already changed)
  112.             if ($variableConstant->getVariable() === $this) {
  113.                 $variableConstant->setVariable(null);
  114.             }
  115.         }
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return Collection<int, VehiculeVariable>
  120.      */
  121.     public function getVehicule(): Collection
  122.     {
  123.         return $this->vehicule;
  124.     }
  125.     public function addVehicule(VehiculeVariable $vehicule): self
  126.     {
  127.         if (!$this->vehicule->contains($vehicule)) {
  128.             $this->vehicule[] = $vehicule;
  129.             $vehicule->setVariable($this);
  130.         }
  131.         return $this;
  132.     }
  133.     public function removeVehicule(VehiculeVariable $vehicule): self
  134.     {
  135.         if ($this->vehicule->removeElement($vehicule)) {
  136.             // set the owning side to null (unless already changed)
  137.             if ($vehicule->getVariable() === $this) {
  138.                 $vehicule->setVariable(null);
  139.             }
  140.         }
  141.         return $this;
  142.     }
  143. }