<?php
namespace App\Entity;
use App\Repository\AtelierChaineRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AtelierChaineRepository::class)]
class AtelierChaine implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name;
#[ORM\ManyToOne(targetEntity: Atelier::class, inversedBy: 'atelierChaines')]
private $atelier;
#[ORM\OneToMany(targetEntity: FicheControleEnCours::class, mappedBy: 'chaine')]
private $ficheControleEnCours;
#[ORM\OneToMany(targetEntity: FicheControlePreserie::class, mappedBy: 'chaine')]
private $ficheControlePreseries;
#[ORM\OneToMany(targetEntity: FicheQualite::class, mappedBy: 'chaine')]
private $ficheQualites;
#[ORM\OneToMany(targetEntity: FicheQualiteAtelier::class, mappedBy: 'chaine')]
private $ficheQualiteAteliers;
#[ORM\OneToMany(targetEntity: FicheQualiteAtelierAuditeur::class, mappedBy: 'chaine')]
private $ficheQualiteAtelierAuditeurs;
#[ORM\OneToMany(targetEntity: FicheQualiteCent::class, mappedBy: 'chaine')]
private $ficheQualiteCents;
public function __construct()
{
$this->ficheControleEnCours = new ArrayCollection();
$this->ficheControlePreseries = new ArrayCollection();
$this->ficheQualites = new ArrayCollection();
$this->ficheQualiteAteliers = new ArrayCollection();
$this->ficheQualiteAtelierAuditeurs = new ArrayCollection();
$this->ficheQualiteCents = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getAtelier(): ?Atelier
{
return $this->atelier;
}
public function setAtelier(?Atelier $atelier): self
{
$this->atelier = $atelier;
return $this;
}
/**
* @return Collection<int, FicheControleEnCours>
*/
public function getFicheControleEnCours(): Collection
{
return $this->ficheControleEnCours;
}
public function addFicheControleEnCour(FicheControleEnCours $ficheControleEnCour): self
{
if (!$this->ficheControleEnCours->contains($ficheControleEnCour)) {
$this->ficheControleEnCours[] = $ficheControleEnCour;
$ficheControleEnCour->setChaine($this);
}
return $this;
}
public function removeFicheControleEnCour(FicheControleEnCours $ficheControleEnCour): self
{
if ($this->ficheControleEnCours->removeElement($ficheControleEnCour)) {
// set the owning side to null (unless already changed)
if ($ficheControleEnCour->getChaine() === $this) {
$ficheControleEnCour->setChaine(null);
}
}
return $this;
}
public function __toString(): string
{
return (string) $this->name;
}
/**
* @return Collection<int, FicheControlePreserie>
*/
public function getFicheControlePreseries(): Collection
{
return $this->ficheControlePreseries;
}
public function addFicheControlePreseries(FicheControlePreserie $ficheControlePreseries): self
{
if (!$this->ficheControlePreseries->contains($ficheControlePreseries)) {
$this->ficheControlePreseries[] = $ficheControlePreseries;
$ficheControlePreseries->setChaine($this);
}
return $this;
}
public function removeFicheControlePreseries(FicheControlePreserie $ficheControlePreseries): self
{
if ($this->ficheControlePreseries->removeElement($ficheControlePreseries)) {
// set the owning side to null (unless already changed)
if ($ficheControlePreseries->getChaine() === $this) {
$ficheControlePreseries->setChaine(null);
}
}
return $this;
}
/**
* @return Collection<int, FicheQualite>
*/
public function getFicheQualites(): Collection
{
return $this->ficheQualites;
}
public function addFicheQualite(FicheQualite $ficheQualite): self
{
if (!$this->ficheQualites->contains($ficheQualite)) {
$this->ficheQualites[] = $ficheQualite;
$ficheQualite->setChaine($this);
}
return $this;
}
public function removeFicheQualite(FicheQualite $ficheQualite): self
{
if ($this->ficheQualites->removeElement($ficheQualite)) {
// set the owning side to null (unless already changed)
if ($ficheQualite->getChaine() === $this) {
$ficheQualite->setChaine(null);
}
}
return $this;
}
/**
* @return Collection<int, FicheQualiteAtelier>
*/
public function getFicheQualiteAteliers(): Collection
{
return $this->ficheQualiteAteliers;
}
public function addFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
{
if (!$this->ficheQualiteAteliers->contains($ficheQualiteAtelier)) {
$this->ficheQualiteAteliers[] = $ficheQualiteAtelier;
$ficheQualiteAtelier->setChaine($this);
}
return $this;
}
public function removeFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
{
if ($this->ficheQualiteAteliers->removeElement($ficheQualiteAtelier)) {
// set the owning side to null (unless already changed)
if ($ficheQualiteAtelier->getChaine() === $this) {
$ficheQualiteAtelier->setChaine(null);
}
}
return $this;
}
/**
* @return Collection<int, FicheQualiteAtelierAuditeur>
*/
public function getFicheQualiteAtelierAuditeurs(): Collection
{
return $this->ficheQualiteAtelierAuditeurs;
}
public function addFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
{
if (!$this->ficheQualiteAtelierAuditeurs->contains($ficheQualiteAtelierAuditeur)) {
$this->ficheQualiteAtelierAuditeurs[] = $ficheQualiteAtelierAuditeur;
$ficheQualiteAtelierAuditeur->setChaine($this);
}
return $this;
}
public function removeFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
{
if ($this->ficheQualiteAtelierAuditeurs->removeElement($ficheQualiteAtelierAuditeur)) {
// set the owning side to null (unless already changed)
if ($ficheQualiteAtelierAuditeur->getChaine() === $this) {
$ficheQualiteAtelierAuditeur->setChaine(null);
}
}
return $this;
}
/**
* @return Collection<int, FicheQualiteCent>
*/
public function getFicheQualiteCents(): Collection
{
return $this->ficheQualiteCents;
}
public function addFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
{
if (!$this->ficheQualiteCents->contains($ficheQualiteCent)) {
$this->ficheQualiteCents[] = $ficheQualiteCent;
$ficheQualiteCent->setChaine($this);
}
return $this;
}
public function removeFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
{
if ($this->ficheQualiteCents->removeElement($ficheQualiteCent)) {
// set the owning side to null (unless already changed)
if ($ficheQualiteCent->getChaine() === $this) {
$ficheQualiteCent->setChaine(null);
}
}
return $this;
}
}