<?php
namespace App\Entity;
use App\Repository\InnovateurRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\Validator\Constraints as Assert;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @ORM\Entity(repositoryClass=InnovateurRepository::class)
* @Vich\Uploadable
*/
class Innovateur
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $prenoms;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $sexe;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $civilite;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateNaissance;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ville;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $pays;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telephone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $biographie;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nomSolution;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\File(
* maxSize = "1024k",
* mimeTypes = {"application/pdf", "application/x-pdf"},
* mimeTypesMessage = "Please upload a valid PDF"
* )
*/
private $photo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* * @Assert\File(
* maxSize = "1024k",
* mimeTypes = {"video/mp4"},
* mimeTypesMessage = "Please upload a valid PDF"
* )
*/
private $video;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $autorisation;
/**
* @Vich\UploadableField(mapping="innov_images", fileNameProperty="photo")
* @var File
*/
private $imageFile;
/**
* @Vich\UploadableField(mapping="innov_images", fileNameProperty="video")
* @var File
*/
private $videoFile;
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenoms(): ?string
{
return $this->prenoms;
}
public function setPrenoms(?string $prenoms): self
{
$this->prenoms = $prenoms;
return $this;
}
public function getSexe(): ?string
{
return $this->sexe;
}
public function setSexe(?string $sexe): self
{
$this->sexe = $sexe;
return $this;
}
public function getCivilite(): ?string
{
return $this->civilite;
}
public function setCivilite(?string $civilite): self
{
$this->civilite = $civilite;
return $this;
}
public function getDateNaissance(): ?\DateTimeInterface
{
return $this->dateNaissance;
}
public function setDateNaissance(?\DateTimeInterface $dateNaissance): self
{
$this->dateNaissance = $dateNaissance;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setPays(?string $pays): self
{
$this->pays = $pays;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(?string $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getBiographie(): ?string
{
return $this->biographie;
}
public function setBiographie(?string $biographie): self
{
$this->biographie = $biographie;
return $this;
}
public function getNomSolution(): ?string
{
return $this->nomSolution;
}
public function setNomSolution(?string $nomSolution): self
{
$this->nomSolution = $nomSolution;
return $this;
}
public function getPhoto(): ?string
{
return $this->photo;
}
public function setPhoto(?string $photo): self
{
$this->photo = $photo;
return $this;
}
public function getVideo(): ?string
{
return $this->video;
}
public function setVideo(?string $video): self
{
$this->video = $video;
return $this;
}
public function getAutorisation(): ?string
{
return $this->autorisation;
}
public function setAutorisation(?string $autorisation): self
{
$this->autorisation = $autorisation;
return $this;
}
public function setImageFile(File $image = null)
{
$this->imageFile = $image;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($image) {
// if 'updatedAt' is not defined in your entity, use another property
// $this->updatedAt = new \DateTime('now');
}
}
public function getImageFile()
{
return $this->imageFile;
}
public function setVideoFile(File $image = null)
{
$this->videoFile = $image;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($image) {
// if 'updatedAt' is not defined in your entity, use another property
// $this->updatedAt = new \DateTime('now');
}
}
public function getVideoFile()
{
return $this->videoFile;
}
}