src/Entity/Derogation.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DerogationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassDerogationRepository::class)]
  8. class Derogation 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 $reference;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $coloris;
  18.     #[ORM\ManyToOne(targetEntityTaille::class, inversedBy'derogations')]
  19.     private $taille;
  20.     #[ORM\ManyToOne(targetEntityBonnet::class, inversedBy'derogations')]
  21.     private $bonnet;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private $numero_lancement;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $name_derogation;
  26.     #[ORM\Column(type'float'nullabletrue)]
  27.     private $quantite_carton;
  28.     #[ORM\Column(type'float'nullabletrue)]
  29.     private $quantite_derogation;
  30.     #[ORM\Column(type'datetime'nullabletrue)]
  31.     private $date_demande;
  32.     #[ORM\ManyToOne(targetEntityDefaut::class, inversedBy'derogations')]
  33.     private $defaut;
  34.     #[ORM\ManyToOne(targetEntityTableauMesureLibelle::class, inversedBy'derogations')]
  35.     private $mesure;
  36.     #[ORM\ManyToOne(targetEntityAtelier::class, inversedBy'derogations')]
  37.     private $atelier;
  38.     #[ORM\OneToMany(targetEntityFicheQualite::class, mappedBy'derogation'cascade: ['persist''remove'])]
  39.     private $ficheQualites;
  40.     #[ORM\Column(type'string'length255nullabletrue)]
  41.     private $numero_derogation;
  42.     public function __construct()
  43.     {
  44.         $this->ficheQualites = new ArrayCollection();
  45.     }
  46.     public function __toString(): string
  47.     {
  48.         return (string) $this->name_derogation;
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getReference(): ?string
  55.     {
  56.         return $this->reference;
  57.     }
  58.     public function setReference(?string $reference): self
  59.     {
  60.         $this->reference $reference;
  61.         return $this;
  62.     }
  63.     public function getColoris(): ?string
  64.     {
  65.         return $this->coloris;
  66.     }
  67.     public function setColoris(?string $coloris): self
  68.     {
  69.         $this->coloris $coloris;
  70.         return $this;
  71.     }
  72.     public function getTaille(): ?Taille
  73.     {
  74.         return $this->taille;
  75.     }
  76.     public function setTaille(?Taille $taille): self
  77.     {
  78.         $this->taille $taille;
  79.         return $this;
  80.     }
  81.     public function getBonnet(): ?Bonnet
  82.     {
  83.         return $this->bonnet;
  84.     }
  85.     public function setBonnet(?Bonnet $bonnet): self
  86.     {
  87.         $this->bonnet $bonnet;
  88.         return $this;
  89.     }
  90.     public function getNumeroLancement(): ?string
  91.     {
  92.         return $this->numero_lancement;
  93.     }
  94.     public function setNumeroLancement(?string $numero_lancement): self
  95.     {
  96.         $this->numero_lancement $numero_lancement;
  97.         return $this;
  98.     }
  99.     public function getNameDerogation(): ?string
  100.     {
  101.         return $this->name_derogation;
  102.     }
  103.     public function setNameDerogation(?string $name_derogation): self
  104.     {
  105.         $this->name_derogation $name_derogation;
  106.         return $this;
  107.     }
  108.     public function getQuantiteCarton(): ?float
  109.     {
  110.         return $this->quantite_carton;
  111.     }
  112.     public function setQuantiteCarton(?float $quantite_carton): self
  113.     {
  114.         $this->quantite_carton $quantite_carton;
  115.         return $this;
  116.     }
  117.     public function getQuantiteDerogation(): ?float
  118.     {
  119.         return $this->quantite_derogation;
  120.     }
  121.     public function setQuantiteDerogation(?float $quantite_derogation): self
  122.     {
  123.         $this->quantite_derogation $quantite_derogation;
  124.         return $this;
  125.     }
  126.     public function getDateDemande(): ?\DateTimeInterface
  127.     {
  128.         return $this->date_demande;
  129.     }
  130.     public function setDateDemande(?\DateTimeInterface $date_demande): self
  131.     {
  132.         $this->date_demande $date_demande;
  133.         return $this;
  134.     }
  135.     public function getDefaut(): ?Defaut
  136.     {
  137.         return $this->defaut;
  138.     }
  139.     public function setDefaut(?Defaut $defaut): self
  140.     {
  141.         $this->defaut $defaut;
  142.         return $this;
  143.     }
  144.     public function getMesure(): ?TableauMesureLibelle
  145.     {
  146.         return $this->mesure;
  147.     }
  148.     public function setMesure(?TableauMesureLibelle $mesure): self
  149.     {
  150.         $this->mesure $mesure;
  151.         return $this;
  152.     }
  153.     public function getAtelier(): ?Atelier
  154.     {
  155.         return $this->atelier;
  156.     }
  157.     public function setAtelier(?Atelier $atelier): self
  158.     {
  159.         $this->atelier $atelier;
  160.         return $this;
  161.     }
  162.     /**
  163.      * @return Collection<int, FicheQualite>
  164.      */
  165.     public function getFicheQualites(): Collection
  166.     {
  167.         return $this->ficheQualites;
  168.     }
  169.     public function addFicheQualite(FicheQualite $ficheQualite): self
  170.     {
  171.         if (!$this->ficheQualites->contains($ficheQualite)) {
  172.             $this->ficheQualites[] = $ficheQualite;
  173.             $ficheQualite->setDerogation($this);
  174.         }
  175.         return $this;
  176.     }
  177.     public function removeFicheQualite(FicheQualite $ficheQualite): self
  178.     {
  179.         if ($this->ficheQualites->removeElement($ficheQualite)) {
  180.             // set the owning side to null (unless already changed)
  181.             if ($ficheQualite->getDerogation() === $this) {
  182.                 $ficheQualite->setDerogation(null);
  183.             }
  184.         }
  185.         return $this;
  186.     }
  187.     public function getNumeroDerogation(): ?string
  188.     {
  189.         return $this->numero_derogation;
  190.     }
  191.     public function setNumeroDerogation(?string $numero_derogation): self
  192.     {
  193.         $this->numero_derogation $numero_derogation;
  194.         return $this;
  195.     }
  196. }