<?php
namespace App\Entity;
use App\Repository\FormationDocumentRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @ORM\Entity(repositoryClass=FormationDocumentRepository::class)
*/
class FormationDocument
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=TypeDocument::class, inversedBy="formationDocuments")
*/
private $typeDocument;
/**
* @ORM\Column(type="string", length=255)
*/
private $fichierDocument;
/**
* @Vich\UploadableField(mapping="fichierDocument", fileNameProperty="fileDiplome")
*/
private $fichier;
/**
* @ORM\ManyToOne(targetEntity=Formation::class, inversedBy="document")
*/
private $formation;
public function getId(): ?int
{
return $this->id;
}
public function getTypeDocument(): ?TypeDocument
{
return $this->typeDocument;
}
public function setTypeDocument(?TypeDocument $typeDocument): self
{
$this->typeDocument = $typeDocument;
return $this;
}
public function getFichierDocument(): ?string
{
return $this->fichierDocument;
}
public function setFichierDocument(string $fichierDocument): self
{
$this->fichierDocument = $fichierDocument;
return $this;
}
public function getFormation(): ?Formation
{
return $this->formation;
}
public function setFormation(?Formation $formation): self
{
$this->formation = $formation;
return $this;
}
public function getFichier()
{
return $this->fichier;
}
public function setFichier(?File $image = null)
{
$this->fichier = $image;
}
}