<?php
namespace App\Entity;
use App\Repository\DossierTechniqueRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @Vich\Uploadable
*/
#[ORM\Entity(repositoryClass: DossierTechniqueRepository::class)]
class DossierTechnique
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $reference;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $fichier_name1;
/**
* @Vich\UploadableField(mapping="dossierTechnique", fileNameProperty="fichier_name1")
*/
private ?\Symfony\Component\HttpFoundation\File\File $fichier1 = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $fichier_name2;
/**
* @Vich\UploadableField(mapping="dossierTechnique", fileNameProperty="fichier_name2")
*/
private ?\Symfony\Component\HttpFoundation\File\File $fichier2 = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_creation;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_update;
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 getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getFichierName1(): ?string
{
return $this->fichier_name1;
}
public function setFichierName1(?string $fichier_name1): self
{
$this->fichier_name1 = $fichier_name1;
return $this;
}
public function getFichierName2(): ?string
{
return $this->fichier_name2;
}
public function setFichierName2(?string $fichier_name2): self
{
$this->fichier_name2 = $fichier_name2;
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 getDateUpdate(): ?\DateTimeInterface
{
return $this->date_update;
}
public function setDateUpdate(?\DateTimeInterface $date_update): self
{
$this->date_update = $date_update;
return $this;
}
}