src/Entity/AtelierChaine.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AtelierChaineRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAtelierChaineRepository::class)]
  8. class AtelierChaine 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\ManyToOne(targetEntityAtelier::class, inversedBy'atelierChaines')]
  17.     private $atelier;
  18.     #[ORM\OneToMany(targetEntityFicheControleEnCours::class, mappedBy'chaine')]
  19.     private $ficheControleEnCours;
  20.     #[ORM\OneToMany(targetEntityFicheControlePreserie::class, mappedBy'chaine')]
  21.     private $ficheControlePreseries;
  22.     #[ORM\OneToMany(targetEntityFicheQualite::class, mappedBy'chaine')]
  23.     private $ficheQualites;
  24.     #[ORM\OneToMany(targetEntityFicheQualiteAtelier::class, mappedBy'chaine')]
  25.     private $ficheQualiteAteliers;
  26.     #[ORM\OneToMany(targetEntityFicheQualiteAtelierAuditeur::class, mappedBy'chaine')]
  27.     private $ficheQualiteAtelierAuditeurs;
  28.     #[ORM\OneToMany(targetEntityFicheQualiteCent::class, mappedBy'chaine')]
  29.     private $ficheQualiteCents;
  30.     public function __construct()
  31.     {
  32.         $this->ficheControleEnCours = new ArrayCollection();
  33.         $this->ficheControlePreseries = new ArrayCollection();
  34.         $this->ficheQualites = new ArrayCollection();
  35.         $this->ficheQualiteAteliers = new ArrayCollection();
  36.         $this->ficheQualiteAtelierAuditeurs = new ArrayCollection();
  37.         $this->ficheQualiteCents = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getName(): ?string
  44.     {
  45.         return $this->name;
  46.     }
  47.     public function setName(?string $name): self
  48.     {
  49.         $this->name $name;
  50.         return $this;
  51.     }
  52.     public function getAtelier(): ?Atelier
  53.     {
  54.         return $this->atelier;
  55.     }
  56.     public function setAtelier(?Atelier $atelier): self
  57.     {
  58.         $this->atelier $atelier;
  59.         return $this;
  60.     }
  61.     /**
  62.      * @return Collection<int, FicheControleEnCours>
  63.      */
  64.     public function getFicheControleEnCours(): Collection
  65.     {
  66.         return $this->ficheControleEnCours;
  67.     }
  68.     public function addFicheControleEnCour(FicheControleEnCours $ficheControleEnCour): self
  69.     {
  70.         if (!$this->ficheControleEnCours->contains($ficheControleEnCour)) {
  71.             $this->ficheControleEnCours[] = $ficheControleEnCour;
  72.             $ficheControleEnCour->setChaine($this);
  73.         }
  74.         return $this;
  75.     }
  76.     public function removeFicheControleEnCour(FicheControleEnCours $ficheControleEnCour): self
  77.     {
  78.         if ($this->ficheControleEnCours->removeElement($ficheControleEnCour)) {
  79.             // set the owning side to null (unless already changed)
  80.             if ($ficheControleEnCour->getChaine() === $this) {
  81.                 $ficheControleEnCour->setChaine(null);
  82.             }
  83.         }
  84.         return $this;
  85.     }
  86.     public function __toString(): string
  87.     {
  88.         return (string) $this->name;
  89.     }
  90.     /**
  91.      * @return Collection<int, FicheControlePreserie>
  92.      */
  93.     public function getFicheControlePreseries(): Collection
  94.     {
  95.         return $this->ficheControlePreseries;
  96.     }
  97.     public function addFicheControlePreseries(FicheControlePreserie $ficheControlePreseries): self
  98.     {
  99.         if (!$this->ficheControlePreseries->contains($ficheControlePreseries)) {
  100.             $this->ficheControlePreseries[] = $ficheControlePreseries;
  101.             $ficheControlePreseries->setChaine($this);
  102.         }
  103.         return $this;
  104.     }
  105.     public function removeFicheControlePreseries(FicheControlePreserie $ficheControlePreseries): self
  106.     {
  107.         if ($this->ficheControlePreseries->removeElement($ficheControlePreseries)) {
  108.             // set the owning side to null (unless already changed)
  109.             if ($ficheControlePreseries->getChaine() === $this) {
  110.                 $ficheControlePreseries->setChaine(null);
  111.             }
  112.         }
  113.         return $this;
  114.     }
  115.     /**
  116.      * @return Collection<int, FicheQualite>
  117.      */
  118.     public function getFicheQualites(): Collection
  119.     {
  120.         return $this->ficheQualites;
  121.     }
  122.     public function addFicheQualite(FicheQualite $ficheQualite): self
  123.     {
  124.         if (!$this->ficheQualites->contains($ficheQualite)) {
  125.             $this->ficheQualites[] = $ficheQualite;
  126.             $ficheQualite->setChaine($this);
  127.         }
  128.         return $this;
  129.     }
  130.     public function removeFicheQualite(FicheQualite $ficheQualite): self
  131.     {
  132.         if ($this->ficheQualites->removeElement($ficheQualite)) {
  133.             // set the owning side to null (unless already changed)
  134.             if ($ficheQualite->getChaine() === $this) {
  135.                 $ficheQualite->setChaine(null);
  136.             }
  137.         }
  138.         return $this;
  139.     }
  140.     /**
  141.      * @return Collection<int, FicheQualiteAtelier>
  142.      */
  143.     public function getFicheQualiteAteliers(): Collection
  144.     {
  145.         return $this->ficheQualiteAteliers;
  146.     }
  147.     public function addFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
  148.     {
  149.         if (!$this->ficheQualiteAteliers->contains($ficheQualiteAtelier)) {
  150.             $this->ficheQualiteAteliers[] = $ficheQualiteAtelier;
  151.             $ficheQualiteAtelier->setChaine($this);
  152.         }
  153.         return $this;
  154.     }
  155.     public function removeFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
  156.     {
  157.         if ($this->ficheQualiteAteliers->removeElement($ficheQualiteAtelier)) {
  158.             // set the owning side to null (unless already changed)
  159.             if ($ficheQualiteAtelier->getChaine() === $this) {
  160.                 $ficheQualiteAtelier->setChaine(null);
  161.             }
  162.         }
  163.         return $this;
  164.     }
  165.     /**
  166.      * @return Collection<int, FicheQualiteAtelierAuditeur>
  167.      */
  168.     public function getFicheQualiteAtelierAuditeurs(): Collection
  169.     {
  170.         return $this->ficheQualiteAtelierAuditeurs;
  171.     }
  172.     public function addFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
  173.     {
  174.         if (!$this->ficheQualiteAtelierAuditeurs->contains($ficheQualiteAtelierAuditeur)) {
  175.             $this->ficheQualiteAtelierAuditeurs[] = $ficheQualiteAtelierAuditeur;
  176.             $ficheQualiteAtelierAuditeur->setChaine($this);
  177.         }
  178.         return $this;
  179.     }
  180.     public function removeFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
  181.     {
  182.         if ($this->ficheQualiteAtelierAuditeurs->removeElement($ficheQualiteAtelierAuditeur)) {
  183.             // set the owning side to null (unless already changed)
  184.             if ($ficheQualiteAtelierAuditeur->getChaine() === $this) {
  185.                 $ficheQualiteAtelierAuditeur->setChaine(null);
  186.             }
  187.         }
  188.         return $this;
  189.     }
  190.     /**
  191.      * @return Collection<int, FicheQualiteCent>
  192.      */
  193.     public function getFicheQualiteCents(): Collection
  194.     {
  195.         return $this->ficheQualiteCents;
  196.     }
  197.     public function addFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
  198.     {
  199.         if (!$this->ficheQualiteCents->contains($ficheQualiteCent)) {
  200.             $this->ficheQualiteCents[] = $ficheQualiteCent;
  201.             $ficheQualiteCent->setChaine($this);
  202.         }
  203.         return $this;
  204.     }
  205.     public function removeFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
  206.     {
  207.         if ($this->ficheQualiteCents->removeElement($ficheQualiteCent)) {
  208.             // set the owning side to null (unless already changed)
  209.             if ($ficheQualiteCent->getChaine() === $this) {
  210.                 $ficheQualiteCent->setChaine(null);
  211.             }
  212.         }
  213.         return $this;
  214.     }
  215. }