<?php
namespace App\Entity;
use App\Repository\AtelierRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AtelierRepository::class)]
class Atelier implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $code_bu;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $cout_horaire;
#[ORM\OneToMany(targetEntity: User::class, mappedBy: 'atelier')]
private $users;
#[ORM\OneToMany(targetEntity: Mailing::class, mappedBy: 'atelier')]
private $mailings;
#[ORM\OneToMany(targetEntity: Colisage::class, mappedBy: 'atelier')]
private $colisages;
#[ORM\OneToMany(targetEntity: FichePreserie::class, mappedBy: 'atelier')]
private $fichePreseries;
#[ORM\OneToMany(targetEntity: FicheControlePreserie::class, mappedBy: 'atelier')]
private $ficheControlePreseries;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $code_magasin;
#[ORM\OneToMany(targetEntity: FicheQualite::class, mappedBy: 'atelier')]
private $ficheQualites;
#[ORM\OneToMany(targetEntity: FicheQualiteAtelierAuditeur::class, mappedBy: 'atelier')]
private $ficheQualiteAtelierAuditeurs;
#[ORM\OneToMany(targetEntity: FormulaireTeteCollection::class, mappedBy: 'atelier')]
private $formulaireTeteCollections;
#[ORM\OneToMany(targetEntity: FormulaireCollection::class, mappedBy: 'atelier')]
private $formulaireCollections;
#[ORM\OneToMany(targetEntity: FicheQualiteSynthese::class, mappedBy: 'atelier')]
private $ficheQualiteSyntheses;
#[ORM\OneToMany(targetEntity: FicheQualiteAtelier::class, mappedBy: 'atelier')]
private $ficheQualiteAteliers;
#[ORM\OneToMany(targetEntity: FicheQualiteCent::class, mappedBy: 'atelier')]
private $ficheQualiteCents;
#[ORM\OneToMany(targetEntity: FicheReparation::class, mappedBy: 'atelier')]
private $ficheReparations;
#[ORM\OneToMany(targetEntity: FicheControleEnCours::class, mappedBy: 'atelier')]
private $ficheControleEnCours;
#[ORM\OneToMany(targetEntity: AtelierChaine::class, mappedBy: 'atelier')]
private $atelierChaines;
#[ORM\Column(type: 'text', nullable: true)]
private $adresse;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $code_postal;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $pays;
#[ORM\Column(type: 'boolean', nullable: true)]
private $actif;
#[ORM\OneToMany(targetEntity: Lancement::class, mappedBy: 'atelier')]
private $lancements;
#[ORM\OneToMany(targetEntity: Derogation::class, mappedBy: 'atelier')]
private $derogations;
#[ORM\OneToMany(targetEntity: DerogationSynthese::class, mappedBy: 'atelier')]
private $derogationSyntheses;
#[ORM\OneToMany(targetEntity: FicheAvoir::class, mappedBy: 'atelier')]
private $ficheAvoirs;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\OneToMany(mappedBy: 'atelier', targetEntity: MailIndicateurQualite::class)]
private Collection $mailIndicateurQualites;
public function __construct()
{
$this->users = new ArrayCollection();
$this->mailings = new ArrayCollection();
$this->colisages = new ArrayCollection();
$this->fichePreseries = new ArrayCollection();
$this->ficheControlePreseries = new ArrayCollection();
$this->ficheQualites = new ArrayCollection();
$this->ficheQualiteAtelierAuditeurs = new ArrayCollection();
$this->formulaireTeteCollections = new ArrayCollection();
$this->formulaireCollections = new ArrayCollection();
$this->ficheQualiteSyntheses = new ArrayCollection();
$this->ficheQualiteAteliers = new ArrayCollection();
$this->ficheQualiteCents = new ArrayCollection();
$this->ficheReparations = new ArrayCollection();
$this->ficheControleEnCours = new ArrayCollection();
$this->atelierChaines = new ArrayCollection();
$this->lancements = new ArrayCollection();
$this->derogations = new ArrayCollection();
$this->derogationSyntheses = new ArrayCollection();
$this->ficheAvoirs = new ArrayCollection();
$this->mailIndicateurQualites = new ArrayCollection();
}
public function __toString(): string
{
return (string) $this->name;
}
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 getCodeBu(): ?string
{
return $this->code_bu;
}
public function setCodeBu(?string $code_bu): self
{
$this->code_bu = $code_bu;
return $this;
}
public function getCoutHoraire(): ?string
{
return $this->cout_horaire;
}
public function setCoutHoraire(?string $cout_horaire): self
{
$this->cout_horaire = $cout_horaire;
return $this;
}
/**
* @return Collection|User[]
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->setAtelier($this);
}
return $this;
}
public function removeUser(User $user): self
{
if ($this->users->removeElement($user)) {
// set the owning side to null (unless already changed)
if ($user->getAtelier() === $this) {
$user->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|Mailing[]
*/
public function getMailings(): Collection
{
return $this->mailings;
}
public function addMailing(Mailing $mailing): self
{
if (!$this->mailings->contains($mailing)) {
$this->mailings[] = $mailing;
$mailing->setAtelier($this);
}
return $this;
}
public function removeMailing(Mailing $mailing): self
{
if ($this->mailings->removeElement($mailing)) {
// set the owning side to null (unless already changed)
if ($mailing->getAtelier() === $this) {
$mailing->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|Colisage[]
*/
public function getColisages(): Collection
{
return $this->colisages;
}
public function addColisage(Colisage $colisage): self
{
if (!$this->colisages->contains($colisage)) {
$this->colisages[] = $colisage;
$colisage->setAtelier($this);
}
return $this;
}
public function removeColisage(Colisage $colisage): self
{
if ($this->colisages->removeElement($colisage)) {
// set the owning side to null (unless already changed)
if ($colisage->getAtelier() === $this) {
$colisage->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FichePreserie[]
*/
public function getFichePreseries(): Collection
{
return $this->fichePreseries;
}
public function addFichePreseries(FichePreserie $fichePreseries): self
{
if (!$this->fichePreseries->contains($fichePreseries)) {
$this->fichePreseries[] = $fichePreseries;
$fichePreseries->setAtelier($this);
}
return $this;
}
public function removeFichePreseries(FichePreserie $fichePreseries): self
{
if ($this->fichePreseries->removeElement($fichePreseries)) {
// set the owning side to null (unless already changed)
if ($fichePreseries->getAtelier() === $this) {
$fichePreseries->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FicheControlePreserie[]
*/
public function getFicheControlePreseries(): Collection
{
return $this->ficheControlePreseries;
}
public function addFicheControlePreseries(FicheControlePreserie $ficheControlePreseries): self
{
if (!$this->ficheControlePreseries->contains($ficheControlePreseries)) {
$this->ficheControlePreseries[] = $ficheControlePreseries;
$ficheControlePreseries->setAtelier($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->getAtelier() === $this) {
$ficheControlePreseries->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|ColisageResponsable[]
*/
public function getColisageResponsables(): Collection
{
return $this->colisageResponsables;
}
public function addColisageReponsable(ColisageResponsable $colisageReponsable): self
{
if (!$this->colisageResponsables->contains($colisageReponsable)) {
$this->colisageResponsables[] = $colisageReponsable;
$colisageReponsable->setAtelier($this);
}
return $this;
}
public function removeColisageReponsable(ColisageResponsable $colisageResponsable): self
{
if ($this->colisageResponsables->removeElement($colisageResponsable)) {
// set the owning side to null (unless already changed)
if ($colisageResponsable->getAtelier() === $this) {
$colisageResponsable->setAtelier(null);
}
}
return $this;
}
public function getCodeMagasin(): ?string
{
return $this->code_magasin;
}
public function setCodeMagasin(?string $code_magasin): self
{
$this->code_magasin = $code_magasin;
return $this;
}
/**
* @return Collection|FicheQualite[]
*/
public function getFicheQualites(): Collection
{
return $this->ficheQualites;
}
public function addFicheQualite(FicheQualite $ficheQualite): self
{
if (!$this->ficheQualites->contains($ficheQualite)) {
$this->ficheQualites[] = $ficheQualite;
$ficheQualite->setAtelier($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->getAtelier() === $this) {
$ficheQualite->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FicheQualiteAtelierAuditeur[]
*/
public function getFicheQualiteAtelierAuditeurs(): Collection
{
return $this->ficheQualiteAtelierAuditeurs;
}
public function addFicheQualiteAtelierAuditeur(FicheQualiteAtelierAuditeur $ficheQualiteAtelierAuditeur): self
{
if (!$this->ficheQualiteAtelierAuditeurs->contains($ficheQualiteAtelierAuditeur)) {
$this->ficheQualiteAtelierAuditeurs[] = $ficheQualiteAtelierAuditeur;
$ficheQualiteAtelierAuditeur->setAtelier($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->getAtelier() === $this) {
$ficheQualiteAtelierAuditeur->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FormulaireTeteCollection[]
*/
public function getFormulaireTeteCollections(): Collection
{
return $this->formulaireTeteCollections;
}
public function addFormulaireTeteCollection(FormulaireTeteCollection $formulaireTeteCollection): self
{
if (!$this->formulaireTeteCollections->contains($formulaireTeteCollection)) {
$this->formulaireTeteCollections[] = $formulaireTeteCollection;
$formulaireTeteCollection->setAtelier($this);
}
return $this;
}
public function removeFormulaireTeteCollection(FormulaireTeteCollection $formulaireTeteCollection): self
{
if ($this->formulaireTeteCollections->removeElement($formulaireTeteCollection)) {
// set the owning side to null (unless already changed)
if ($formulaireTeteCollection->getAtelier() === $this) {
$formulaireTeteCollection->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FormulaireCollection[]
*/
public function getFormulaireCollections(): Collection
{
return $this->formulaireCollections;
}
public function addFormulaireCollection(FormulaireCollection $formulaireCollection): self
{
if (!$this->formulaireCollections->contains($formulaireCollection)) {
$this->formulaireCollections[] = $formulaireCollection;
$formulaireCollection->setAtelier($this);
}
return $this;
}
public function removeFormulaireCollection(FormulaireCollection $formulaireCollection): self
{
if ($this->formulaireCollections->removeElement($formulaireCollection)) {
// set the owning side to null (unless already changed)
if ($formulaireCollection->getAtelier() === $this) {
$formulaireCollection->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FicheQualiteSynthese[]
*/
public function getFicheQualiteSyntheses(): Collection
{
return $this->ficheQualiteSyntheses;
}
public function addFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
{
if (!$this->ficheQualiteSyntheses->contains($ficheQualiteSynthesis)) {
$this->ficheQualiteSyntheses[] = $ficheQualiteSynthesis;
$ficheQualiteSynthesis->setAtelier($this);
}
return $this;
}
public function removeFicheQualiteSynthesis(FicheQualiteSynthese $ficheQualiteSynthesis): self
{
if ($this->ficheQualiteSyntheses->removeElement($ficheQualiteSynthesis)) {
// set the owning side to null (unless already changed)
if ($ficheQualiteSynthesis->getAtelier() === $this) {
$ficheQualiteSynthesis->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FicheQualiteAtelier[]
*/
public function getFicheQualiteAteliers(): Collection
{
return $this->ficheQualiteAteliers;
}
public function addFicheQualiteAtelier(FicheQualiteAtelier $ficheQualiteAtelier): self
{
if (!$this->ficheQualiteAteliers->contains($ficheQualiteAtelier)) {
$this->ficheQualiteAteliers[] = $ficheQualiteAtelier;
$ficheQualiteAtelier->setAtelier($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->getAtelier() === $this) {
$ficheQualiteAtelier->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection|FicheQualiteCent[]
*/
public function getFicheQualiteCents(): Collection
{
return $this->ficheQualiteCents;
}
public function addFicheQualiteCent(FicheQualiteCent $ficheQualiteCent): self
{
if (!$this->ficheQualiteCents->contains($ficheQualiteCent)) {
$this->ficheQualiteCents[] = $ficheQualiteCent;
$ficheQualiteCent->setAtelier($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->getAtelier() === $this) {
$ficheQualiteCent->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection<int, FicheReparation>
*/
public function getFicheReparations(): Collection
{
return $this->ficheReparations;
}
public function addFicheReparation(FicheReparation $ficheReparation): self
{
if (!$this->ficheReparations->contains($ficheReparation)) {
$this->ficheReparations[] = $ficheReparation;
$ficheReparation->setAtelier($this);
}
return $this;
}
public function removeFicheReparation(FicheReparation $ficheReparation): self
{
if ($this->ficheReparations->removeElement($ficheReparation)) {
// set the owning side to null (unless already changed)
if ($ficheReparation->getAtelier() === $this) {
$ficheReparation->setAtelier(null);
}
}
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->setAtelier($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->getAtelier() === $this) {
$ficheControleEnCour->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection<int, AtelierChaine>
*/
public function getAtelierChaines(): Collection
{
return $this->atelierChaines;
}
public function addAtelierChaine(AtelierChaine $atelierChaine): self
{
if (!$this->atelierChaines->contains($atelierChaine)) {
$this->atelierChaines[] = $atelierChaine;
$atelierChaine->setAtelier($this);
}
return $this;
}
public function removeAtelierChaine(AtelierChaine $atelierChaine): self
{
if ($this->atelierChaines->removeElement($atelierChaine)) {
// set the owning side to null (unless already changed)
if ($atelierChaine->getAtelier() === $this) {
$atelierChaine->setAtelier(null);
}
}
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getCodePostal(): ?string
{
return $this->code_postal;
}
public function setCodePostal(?string $code_postal): self
{
$this->code_postal = $code_postal;
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setPays(?string $pays): self
{
$this->pays = $pays;
return $this;
}
public function getActif(): ?bool
{
return $this->actif;
}
public function setActif(?bool $actif): self
{
$this->actif = $actif;
return $this;
}
/**
* @return Collection<int, Lancement>
*/
public function getLancements(): Collection
{
return $this->lancements;
}
public function addLancement(Lancement $lancement): self
{
if (!$this->lancements->contains($lancement)) {
$this->lancements[] = $lancement;
$lancement->setAtelier($this);
}
return $this;
}
public function removeLancement(Lancement $lancement): self
{
if ($this->lancements->removeElement($lancement)) {
// set the owning side to null (unless already changed)
if ($lancement->getAtelier() === $this) {
$lancement->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection<int, Derogation>
*/
public function getDerogations(): Collection
{
return $this->derogations;
}
public function addDerogation(Derogation $derogation): self
{
if (!$this->derogations->contains($derogation)) {
$this->derogations[] = $derogation;
$derogation->setAtelier($this);
}
return $this;
}
public function removeDerogation(Derogation $derogation): self
{
if ($this->derogations->removeElement($derogation)) {
// set the owning side to null (unless already changed)
if ($derogation->getAtelier() === $this) {
$derogation->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection<int, DerogationSynthese>
*/
public function getDerogationSyntheses(): Collection
{
return $this->derogationSyntheses;
}
public function addDerogationSynthesis(DerogationSynthese $derogationSynthesis): self
{
if (!$this->derogationSyntheses->contains($derogationSynthesis)) {
$this->derogationSyntheses[] = $derogationSynthesis;
$derogationSynthesis->setAtelier($this);
}
return $this;
}
public function removeDerogationSynthesis(DerogationSynthese $derogationSynthesis): self
{
if ($this->derogationSyntheses->removeElement($derogationSynthesis)) {
// set the owning side to null (unless already changed)
if ($derogationSynthesis->getAtelier() === $this) {
$derogationSynthesis->setAtelier(null);
}
}
return $this;
}
/**
* @return Collection<int, FicheAvoir>
*/
public function getFicheAvoirs(): Collection
{
return $this->ficheAvoirs;
}
public function addFicheAvoir(FicheAvoir $ficheAvoir): self
{
if (!$this->ficheAvoirs->contains($ficheAvoir)) {
$this->ficheAvoirs[] = $ficheAvoir;
$ficheAvoir->setAtelier($this);
}
return $this;
}
public function removeFicheAvoir(FicheAvoir $ficheAvoir): self
{
if ($this->ficheAvoirs->removeElement($ficheAvoir)) {
// set the owning side to null (unless already changed)
if ($ficheAvoir->getAtelier() === $this) {
$ficheAvoir->setAtelier(null);
}
}
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): static
{
$this->type = $type;
return $this;
}
/**
* @return Collection<int, MailIndicateurQualite>
*/
public function getMailIndicateurQualites(): Collection
{
return $this->mailIndicateurQualites;
}
public function addMailIndicateurQualite(MailIndicateurQualite $mailIndicateurQualite): static
{
if (!$this->mailIndicateurQualites->contains($mailIndicateurQualite)) {
$this->mailIndicateurQualites->add($mailIndicateurQualite);
$mailIndicateurQualite->setAtelier($this);
}
return $this;
}
public function removeMailIndicateurQualite(MailIndicateurQualite $mailIndicateurQualite): static
{
if ($this->mailIndicateurQualites->removeElement($mailIndicateurQualite)) {
// set the owning side to null (unless already changed)
if ($mailIndicateurQualite->getAtelier() === $this) {
$mailIndicateurQualite->setAtelier(null);
}
}
return $this;
}
}