src/Entity/Defaut.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DefautRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassDefautRepository::class)]
  8. class Defaut implements \Stringable
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $name;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $name_en;
  18.     #[ORM\ManyToOne(targetEntityDefautCategorie::class, inversedBy'defauts')]
  19.     private $categorie;
  20.     #[ORM\OneToMany(targetEntityDefautParFamille::class, mappedBy'defaut')]
  21.     private $defautParFamilles;
  22.     #[ORM\OneToMany(targetEntityFicheQualiteDefaut::class, mappedBy'defaut')]
  23.     private $ficheQualiteDefauts;
  24.     #[ORM\OneToMany(targetEntityFicheQualiteAtelierAuditeurDefaut::class, mappedBy'defaut')]
  25.     private $ficheQualiteAtelierAuditeurDefauts;
  26.     #[ORM\OneToMany(targetEntityFicheQualiteAtelierDefaut::class, mappedBy'defaut')]
  27.     private $ficheQualiteAtelierDefauts;
  28.     #[ORM\OneToMany(targetEntityFicheQualiteCentDefaut::class, mappedBy'defaut')]
  29.     private $ficheQualiteCentDefauts;
  30.     #[ORM\OneToMany(targetEntityFicheQualiteChoixDefaut::class, mappedBy'yes')]
  31.     private $ficheQualiteChoixDefauts;
  32.     #[ORM\OneToMany(targetEntityFicheReparation::class, mappedBy'defaut')]
  33.     private $ficheReparations;
  34.     #[ORM\OneToMany(targetEntityFicheControleEnCoursDefaut::class, mappedBy'defaut')]
  35.     private $ficheControleEnCoursDefauts;
  36.     #[ORM\OneToMany(targetEntityDerogation::class, mappedBy'defaut')]
  37.     private $derogations;
  38.     #[ORM\OneToMany(targetEntityDerogationSynthese::class, mappedBy'defaut')]
  39.     private $derogationSyntheses;
  40.     public function __construct()
  41.     {
  42.         $this->defautParFamilles = new ArrayCollection();
  43.         $this->ficheQualiteDefauts = new ArrayCollection();
  44.         $this->ficheQualiteAtelierAuditeurDefauts = new ArrayCollection();
  45.         $this->ficheQualiteAtelierDefauts = new ArrayCollection();
  46.         $this->ficheQualiteCentDefauts = new ArrayCollection();
  47.         $this->ficheQualiteChoixDefauts = new ArrayCollection();
  48.         $this->ficheReparations = new ArrayCollection();
  49.         $this->ficheControleEnCoursDefauts = new ArrayCollection();
  50.         $this->derogations = new ArrayCollection();
  51.         $this->derogationSyntheses = new ArrayCollection();
  52.     }
  53.     public function __toString(): string{
  54.         return (string) $this->name;
  55.     }
  56.     public function getId(): ?int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getName(): ?string
  61.     {
  62.         return $this->name;
  63.     }
  64.     public function setName(?string $name): self
  65.     {
  66.         $this->name $name;
  67.         return $this;
  68.     }
  69.     public function getNameEn(): ?string
  70.     {
  71.         return $this->name_en;
  72.     }
  73.     public function setNameEn(?string $name_en): self
  74.     {
  75.         $this->name_en $name_en;
  76.         return $this;
  77.     }
  78.     public function getCategorie(): ?DefautCategorie
  79.     {
  80.         return $this->categorie;
  81.     }
  82.     public function setCategorie(?DefautCategorie $categorie): self
  83.     {
  84.         $this->categorie $categorie;
  85.         return $this;
  86.     }
  87.     /**
  88.      * @return Collection|DefautParFamille[]
  89.      */
  90.     public function getDefautParFamilles(): Collection
  91.     {
  92.         return $this->defautParFamilles;
  93.     }
  94.     public function addDefautParFamille(DefautParFamille $defautParFamille): self
  95.     {
  96.         if (!$this->defautParFamilles->contains($defautParFamille)) {
  97.             $this->defautParFamilles[] = $defautParFamille;
  98.             $defautParFamille->setDefaut($this);
  99.         }
  100.         return $this;
  101.     }
  102.     public function removeDefautParFamille(DefautParFamille $defautParFamille): self
  103.     {
  104.         if ($this->defautParFamilles->removeElement($defautParFamille)) {
  105.             // set the owning side to null (unless already changed)
  106.             if ($defautParFamille->getDefaut() === $this) {
  107.                 $defautParFamille->setDefaut(null);
  108.             }
  109.         }
  110.         return $this;
  111.     }
  112.     /**
  113.      * @return Collection|FicheQualiteDefaut[]
  114.      */
  115.     public function getFicheQualiteDefauts(): Collection
  116.     {
  117.         return $this->ficheQualiteDefauts;
  118.     }
  119.     public function addFicheQualiteDefaut(FicheQualiteDefaut $ficheQualiteDefaut): self
  120.     {
  121.         if (!$this->ficheQualiteDefauts->contains($ficheQualiteDefaut)) {
  122.             $this->ficheQualiteDefauts[] = $ficheQualiteDefaut;
  123.             $ficheQualiteDefaut->setDefaut($this);
  124.         }
  125.         return $this;
  126.     }
  127.     public function removeFicheQualiteDefaut(FicheQualiteDefaut $ficheQualiteDefaut): self
  128.     {
  129.         if ($this->ficheQualiteDefauts->removeElement($ficheQualiteDefaut)) {
  130.             // set the owning side to null (unless already changed)
  131.             if ($ficheQualiteDefaut->getDefaut() === $this) {
  132.                 $ficheQualiteDefaut->setDefaut(null);
  133.             }
  134.         }
  135.         return $this;
  136.     }
  137.     /**
  138.      * @return Collection|FicheQualiteAtelierAuditeurDefaut[]
  139.      */
  140.     public function getFicheQualiteAtelierAuditeurDefauts(): Collection
  141.     {
  142.         return $this->ficheQualiteAtelierAuditeurDefauts;
  143.     }
  144.     public function addFicheQualiteAtelierAuditeurDefaut(FicheQualiteAtelierAuditeurDefaut $ficheQualiteAtelierAuditeurDefaut): self
  145.     {
  146.         if (!$this->ficheQualiteAtelierAuditeurDefauts->contains($ficheQualiteAtelierAuditeurDefaut)) {
  147.             $this->ficheQualiteAtelierAuditeurDefauts[] = $ficheQualiteAtelierAuditeurDefaut;
  148.             $ficheQualiteAtelierAuditeurDefaut->setDefaut($this);
  149.         }
  150.         return $this;
  151.     }
  152.     public function removeFicheQualiteAtelierAuditeurDefaut(FicheQualiteAtelierAuditeurDefaut $ficheQualiteAtelierAuditeurDefaut): self
  153.     {
  154.         if ($this->ficheQualiteAtelierAuditeurDefauts->removeElement($ficheQualiteAtelierAuditeurDefaut)) {
  155.             // set the owning side to null (unless already changed)
  156.             if ($ficheQualiteAtelierAuditeurDefaut->getDefaut() === $this) {
  157.                 $ficheQualiteAtelierAuditeurDefaut->setDefaut(null);
  158.             }
  159.         }
  160.         return $this;
  161.     }
  162.     /**
  163.      * @return Collection|FicheQualiteAtelierDefaut[]
  164.      */
  165.     public function getFicheQualiteAtelierDefauts(): Collection
  166.     {
  167.         return $this->ficheQualiteAtelierDefauts;
  168.     }
  169.     public function addFicheQualiteAtelierDefaut(FicheQualiteAtelierDefaut $ficheQualiteAtelierDefaut): self
  170.     {
  171.         if (!$this->ficheQualiteAtelierDefauts->contains($ficheQualiteAtelierDefaut)) {
  172.             $this->ficheQualiteAtelierDefauts[] = $ficheQualiteAtelierDefaut;
  173.             $ficheQualiteAtelierDefaut->setDefaut($this);
  174.         }
  175.         return $this;
  176.     }
  177.     public function removeFicheQualiteAtelierDefaut(FicheQualiteAtelierDefaut $ficheQualiteAtelierDefaut): self
  178.     {
  179.         if ($this->ficheQualiteAtelierDefauts->removeElement($ficheQualiteAtelierDefaut)) {
  180.             // set the owning side to null (unless already changed)
  181.             if ($ficheQualiteAtelierDefaut->getDefaut() === $this) {
  182.                 $ficheQualiteAtelierDefaut->setDefaut(null);
  183.             }
  184.         }
  185.         return $this;
  186.     }
  187.     /**
  188.      * @return Collection|FicheQualiteCentDefaut[]
  189.      */
  190.     public function getFicheQualiteCentDefauts(): Collection
  191.     {
  192.         return $this->ficheQualiteCentDefauts;
  193.     }
  194.     public function addFicheQualiteCentDefaut(FicheQualiteCentDefaut $ficheQualiteCentDefaut): self
  195.     {
  196.         if (!$this->ficheQualiteCentDefauts->contains($ficheQualiteCentDefaut)) {
  197.             $this->ficheQualiteCentDefauts[] = $ficheQualiteCentDefaut;
  198.             $ficheQualiteCentDefaut->setDefaut($this);
  199.         }
  200.         return $this;
  201.     }
  202.     public function removeFicheQualiteCentDefaut(FicheQualiteCentDefaut $ficheQualiteCentDefaut): self
  203.     {
  204.         if ($this->ficheQualiteCentDefauts->removeElement($ficheQualiteCentDefaut)) {
  205.             // set the owning side to null (unless already changed)
  206.             if ($ficheQualiteCentDefaut->getDefaut() === $this) {
  207.                 $ficheQualiteCentDefaut->setDefaut(null);
  208.             }
  209.         }
  210.         return $this;
  211.     }
  212.     /**
  213.      * @return Collection<int, FicheQualiteChoixDefaut>
  214.      */
  215.     public function getFicheQualiteChoixDefauts(): Collection
  216.     {
  217.         return $this->ficheQualiteChoixDefauts;
  218.     }
  219.     public function addFicheQualiteChoixDefaut(FicheQualiteChoixDefaut $ficheQualiteChoixDefaut): self
  220.     {
  221.         if (!$this->ficheQualiteChoixDefauts->contains($ficheQualiteChoixDefaut)) {
  222.             $this->ficheQualiteChoixDefauts[] = $ficheQualiteChoixDefaut;
  223.             $ficheQualiteChoixDefaut->setYes($this);
  224.         }
  225.         return $this;
  226.     }
  227.     public function removeFicheQualiteChoixDefaut(FicheQualiteChoixDefaut $ficheQualiteChoixDefaut): self
  228.     {
  229.         if ($this->ficheQualiteChoixDefauts->removeElement($ficheQualiteChoixDefaut)) {
  230.             // set the owning side to null (unless already changed)
  231.             if ($ficheQualiteChoixDefaut->getYes() === $this) {
  232.                 $ficheQualiteChoixDefaut->setYes(null);
  233.             }
  234.         }
  235.         return $this;
  236.     }
  237.     /**
  238.      * @return Collection<int, FicheReparation>
  239.      */
  240.     public function getFicheReparations(): Collection
  241.     {
  242.         return $this->ficheReparations;
  243.     }
  244.     public function addFicheReparation(FicheReparation $ficheReparation): self
  245.     {
  246.         if (!$this->ficheReparations->contains($ficheReparation)) {
  247.             $this->ficheReparations[] = $ficheReparation;
  248.             $ficheReparation->setDefaut($this);
  249.         }
  250.         return $this;
  251.     }
  252.     public function removeFicheReparation(FicheReparation $ficheReparation): self
  253.     {
  254.         if ($this->ficheReparations->removeElement($ficheReparation)) {
  255.             // set the owning side to null (unless already changed)
  256.             if ($ficheReparation->getDefaut() === $this) {
  257.                 $ficheReparation->setDefaut(null);
  258.             }
  259.         }
  260.         return $this;
  261.     }
  262.     /**
  263.      * @return Collection<int, FicheControleEnCoursDefaut>
  264.      */
  265.     public function getFicheControleEnCoursDefauts(): Collection
  266.     {
  267.         return $this->ficheControleEnCoursDefauts;
  268.     }
  269.     public function addFicheControleEnCoursDefaut(FicheControleEnCoursDefaut $ficheControleEnCoursDefaut): self
  270.     {
  271.         if (!$this->ficheControleEnCoursDefauts->contains($ficheControleEnCoursDefaut)) {
  272.             $this->ficheControleEnCoursDefauts[] = $ficheControleEnCoursDefaut;
  273.             $ficheControleEnCoursDefaut->setDefaut($this);
  274.         }
  275.         return $this;
  276.     }
  277.     public function removeFicheControleEnCoursDefaut(FicheControleEnCoursDefaut $ficheControleEnCoursDefaut): self
  278.     {
  279.         if ($this->ficheControleEnCoursDefauts->removeElement($ficheControleEnCoursDefaut)) {
  280.             // set the owning side to null (unless already changed)
  281.             if ($ficheControleEnCoursDefaut->getDefaut() === $this) {
  282.                 $ficheControleEnCoursDefaut->setDefaut(null);
  283.             }
  284.         }
  285.         return $this;
  286.     }
  287.     /**
  288.      * @return Collection<int, Derogation>
  289.      */
  290.     public function getDerogations(): Collection
  291.     {
  292.         return $this->derogations;
  293.     }
  294.     public function addDerogation(Derogation $derogation): self
  295.     {
  296.         if (!$this->derogations->contains($derogation)) {
  297.             $this->derogations[] = $derogation;
  298.             $derogation->setDefaut($this);
  299.         }
  300.         return $this;
  301.     }
  302.     public function removeDerogation(Derogation $derogation): self
  303.     {
  304.         if ($this->derogations->removeElement($derogation)) {
  305.             // set the owning side to null (unless already changed)
  306.             if ($derogation->getDefaut() === $this) {
  307.                 $derogation->setDefaut(null);
  308.             }
  309.         }
  310.         return $this;
  311.     }
  312.     /**
  313.      * @return Collection<int, DerogationSynthese>
  314.      */
  315.     public function getDerogationSyntheses(): Collection
  316.     {
  317.         return $this->derogationSyntheses;
  318.     }
  319.     public function addDerogationSynthesis(DerogationSynthese $derogationSynthesis): self
  320.     {
  321.         if (!$this->derogationSyntheses->contains($derogationSynthesis)) {
  322.             $this->derogationSyntheses[] = $derogationSynthesis;
  323.             $derogationSynthesis->setDefaut($this);
  324.         }
  325.         return $this;
  326.     }
  327.     public function removeDerogationSynthesis(DerogationSynthese $derogationSynthesis): self
  328.     {
  329.         if ($this->derogationSyntheses->removeElement($derogationSynthesis)) {
  330.             // set the owning side to null (unless already changed)
  331.             if ($derogationSynthesis->getDefaut() === $this) {
  332.                 $derogationSynthesis->setDefaut(null);
  333.             }
  334.         }
  335.         return $this;
  336.     }
  337. }