src/Entity/DossierTechnique.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DossierTechniqueRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. /**
  8.  * @Vich\Uploadable
  9.  */
  10. #[ORM\Entity(repositoryClassDossierTechniqueRepository::class)]
  11. class DossierTechnique
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column(type'integer')]
  16.     private $id;
  17.     #[ORM\Column(type'string'length255nullabletrue)]
  18.     private $reference;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private $fichier_name1;
  21.     /**
  22.      * @Vich\UploadableField(mapping="dossierTechnique", fileNameProperty="fichier_name1")
  23.      */
  24.     private ?\Symfony\Component\HttpFoundation\File\File $fichier1 null;
  25.     #[ORM\Column(type'string'length255nullabletrue)]
  26.     private $fichier_name2;
  27.     /**
  28.      * @Vich\UploadableField(mapping="dossierTechnique", fileNameProperty="fichier_name2")
  29.      */
  30.     private ?\Symfony\Component\HttpFoundation\File\File $fichier2 null;
  31.     #[ORM\Column(type'datetime'nullabletrue)]
  32.     private $date_creation;
  33.     #[ORM\Column(type'datetime'nullabletrue)]
  34.     private $date_update;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function setFichier1(File $file null)
  40.     {
  41.         $this->fichier1 $file;
  42.         if ($file) {
  43.             $this->date_update = new \DateTime;
  44.         }
  45.     }
  46.     public function getFichier1()
  47.     {
  48.         return $this->fichier1;
  49.     }
  50.     public function setFichier2(File $file null)
  51.     {
  52.         $this->fichier2 $file;
  53.         if ($file) {
  54.             $this->date_update = new \DateTime;
  55.         }
  56.     }
  57.     public function getFichier2()
  58.     {
  59.         return $this->fichier2;
  60.     }
  61.     public function getReference(): ?string
  62.     {
  63.         return $this->reference;
  64.     }
  65.     public function setReference(?string $reference): self
  66.     {
  67.         $this->reference $reference;
  68.         return $this;
  69.     }
  70.     public function getFichierName1(): ?string
  71.     {
  72.         return $this->fichier_name1;
  73.     }
  74.     public function setFichierName1(?string $fichier_name1): self
  75.     {
  76.         $this->fichier_name1 $fichier_name1;
  77.         return $this;
  78.     }
  79.     public function getFichierName2(): ?string
  80.     {
  81.         return $this->fichier_name2;
  82.     }
  83.     public function setFichierName2(?string $fichier_name2): self
  84.     {
  85.         $this->fichier_name2 $fichier_name2;
  86.         return $this;
  87.     }
  88.     public function getDateCreation(): ?\DateTimeInterface
  89.     {
  90.         return $this->date_creation;
  91.     }
  92.     public function setDateCreation(?\DateTimeInterface $date_creation): self
  93.     {
  94.         $this->date_creation $date_creation;
  95.         return $this;
  96.     }
  97.     public function getDateUpdate(): ?\DateTimeInterface
  98.     {
  99.         return $this->date_update;
  100.     }
  101.     public function setDateUpdate(?\DateTimeInterface $date_update): self
  102.     {
  103.         $this->date_update $date_update;
  104.         return $this;
  105.     }
  106. }