<?php
namespace App\Entity;
use App\Repository\DerogationSyntheseRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @Vich\Uploadable
*/
#[ORM\Entity(repositoryClass: DerogationSyntheseRepository::class)]
class DerogationSynthese implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name_derogation;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $reference;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $coloris;
#[ORM\ManyToOne(targetEntity: Taille::class, inversedBy: 'derogationSyntheses')]
private $taille;
#[ORM\ManyToOne(targetEntity: Bonnet::class, inversedBy: 'derogationSyntheses')]
private $bonnet;
#[ORM\Column(type: 'float', nullable: true)]
private $quantite_totale;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $numero_lancement;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_creation;
#[ORM\Column(type: 'boolean', nullable: true)]
private $ferme;
#[ORM\ManyToOne(targetEntity: StatutDerogation::class, inversedBy: 'derogationSyntheses')]
private $statut;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $numero_derogation;
#[ORM\ManyToOne(targetEntity: Atelier::class, inversedBy: 'derogationSyntheses')]
private $atelier;
#[ORM\ManyToOne(targetEntity: TableauMesureLibelle::class, inversedBy: 'derogationSyntheses')]
private $mesure;
#[ORM\ManyToOne(targetEntity: Defaut::class, inversedBy: 'derogationSyntheses')]
private $defaut;
#[ORM\Column(type: 'text', nullable: true)]
private $commentaire;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $image1;
/**
* @Vich\UploadableField(mapping="derogations", fileNameProperty="image1")
*/
private ?\Symfony\Component\HttpFoundation\File\File $fichier1 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $image2;
/**
* @Vich\UploadableField(mapping="derogations", fileNameProperty="image2")
*/
private ?\Symfony\Component\HttpFoundation\File\File $fichier2 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $image3;
/**
* @Vich\UploadableField(mapping="derogations", fileNameProperty="image3")
*/
private ?\Symfony\Component\HttpFoundation\File\File $fichier3 = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_update;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_fermeture;
public function getId(): ?int
{
return $this->id;
}
public function setFichier1(File $file = null)
{
$this->fichier1 = $file;
if ($file) {
$this->date_update = new \DateTime;
}
}
public function getFichier1()
{
return $this->fichier1;
}
public function setFichier2(File $file = null)
{
$this->fichier2 = $file;
if ($file) {
$this->date_update = new \DateTime;
}
}
public function getFichier2()
{
return $this->fichier2;
}
public function setFichier3(File $file = null)
{
$this->fichier3 = $file;
if ($file) {
$this->date_update = new \DateTime;
}
}
public function getFichier3()
{
return $this->fichier3;
}
public function getNameDerogation(): ?string
{
return $this->name_derogation;
}
public function setNameDerogation(?string $name_derogation): self
{
$this->name_derogation = $name_derogation;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getColoris(): ?string
{
return $this->coloris;
}
public function setColoris(?string $coloris): self
{
$this->coloris = $coloris;
return $this;
}
public function getTaille(): ?Taille
{
return $this->taille;
}
public function setTaille(?Taille $taille): self
{
$this->taille = $taille;
return $this;
}
public function getBonnet(): ?Bonnet
{
return $this->bonnet;
}
public function setBonnet(?Bonnet $bonnet): self
{
$this->bonnet = $bonnet;
return $this;
}
public function getQuantiteTotale(): ?float
{
return $this->quantite_totale;
}
public function setQuantiteTotale(?float $quantite_totale): self
{
$this->quantite_totale = $quantite_totale;
return $this;
}
public function getNumeroLancement(): ?string
{
return $this->numero_lancement;
}
public function setNumeroLancement(?string $numero_lancement): self
{
$this->numero_lancement = $numero_lancement;
return $this;
}
public function getDateCreation(): ?\DateTimeInterface
{
return $this->date_creation;
}
public function setDateCreation(?\DateTimeInterface $date_creation): self
{
$this->date_creation = $date_creation;
return $this;
}
public function getFerme(): ?bool
{
return $this->ferme;
}
public function setFerme(?bool $ferme): self
{
$this->ferme = $ferme;
return $this;
}
public function __toString(): string
{
return (string) $this->name_derogation;
}
public function getStatut(): ?StatutDerogation
{
return $this->statut;
}
public function setStatut(?StatutDerogation $statut): self
{
$this->statut = $statut;
return $this;
}
public function getNumeroDerogation(): ?string
{
return $this->numero_derogation;
}
public function setNumeroDerogation(?string $numero_derogation): self
{
$this->numero_derogation = $numero_derogation;
return $this;
}
public function getAtelier(): ?Atelier
{
return $this->atelier;
}
public function setAtelier(?Atelier $atelier): self
{
$this->atelier = $atelier;
return $this;
}
public function getMesure(): ?TableauMesureLibelle
{
return $this->mesure;
}
public function setMesure(?TableauMesureLibelle $mesure): self
{
$this->mesure = $mesure;
return $this;
}
public function getDefaut(): ?Defaut
{
return $this->defaut;
}
public function setDefaut(?Defaut $defaut): self
{
$this->defaut = $defaut;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getImage1(): ?string
{
return $this->image1;
}
public function setImage1(?string $image1): self
{
$this->image1 = $image1;
return $this;
}
public function getImage2(): ?string
{
return $this->image2;
}
public function setImage2(?string $image2): self
{
$this->image2 = $image2;
return $this;
}
public function getImage3(): ?string
{
return $this->image3;
}
public function setImage3(?string $image3): self
{
$this->image3 = $image3;
return $this;
}
public function getDateUpdate(): ?\DateTimeInterface
{
return $this->date_update;
}
public function setDateUpdate(?\DateTimeInterface $date_update): self
{
$this->date_update = $date_update;
return $this;
}
public function getDateFermeture(): ?\DateTimeInterface
{
return $this->date_fermeture;
}
public function setDateFermeture(?\DateTimeInterface $date_fermeture): self
{
$this->date_fermeture = $date_fermeture;
return $this;
}
}