src/Entity/Innovateur.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InnovateurRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. /**
  9.  * @ORM\Entity(repositoryClass=InnovateurRepository::class)
  10.  * @Vich\Uploadable
  11.  */
  12. class Innovateur
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=true)
  22.      */
  23.     private $nom;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $prenoms;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private $sexe;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $civilite;
  36.     /**
  37.      * @ORM\Column(type="datetime", nullable=true)
  38.      */
  39.     private $dateNaissance;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private $ville;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $pays;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $telephone;
  52.     /**
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      */
  55.     private $email;
  56.     /**
  57.      * @ORM\Column(type="text", nullable=true)
  58.      */
  59.     private $description;
  60.     /**
  61.      * @ORM\Column(type="text", nullable=true)
  62.      */
  63.     private $biographie;
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     private $nomSolution;
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      * @Assert\File(
  71.      *     maxSize = "1024k",
  72.      *     mimeTypes = {"application/pdf", "application/x-pdf"},
  73.      *     mimeTypesMessage = "Please upload a valid PDF"
  74.      * )
  75.      */
  76.     private $photo;
  77.     /**
  78.      * @ORM\Column(type="string", length=255, nullable=true)
  79.      *  * @Assert\File(
  80.      *     maxSize = "1024k",
  81.      *     mimeTypes = {"video/mp4"},
  82.      *     mimeTypesMessage = "Please upload a valid PDF"
  83.      * )
  84.      */
  85.     private $video;
  86.     /**
  87.      * @ORM\Column(type="string", length=255, nullable=true)
  88.      */
  89.     private $autorisation;
  90.     /**
  91.      * @Vich\UploadableField(mapping="innov_images", fileNameProperty="photo")
  92.      * @var File
  93.      */
  94.     private $imageFile;
  95.     /**
  96.      * @Vich\UploadableField(mapping="innov_images", fileNameProperty="video")
  97.      * @var File
  98.      */
  99.     private $videoFile;
  100.     public function getId(): ?int
  101.     {
  102.         return $this->id;
  103.     }
  104.     public function getNom(): ?string
  105.     {
  106.         return $this->nom;
  107.     }
  108.     public function setNom(?string $nom): self
  109.     {
  110.         $this->nom $nom;
  111.         return $this;
  112.     }
  113.     public function getPrenoms(): ?string
  114.     {
  115.         return $this->prenoms;
  116.     }
  117.     public function setPrenoms(?string $prenoms): self
  118.     {
  119.         $this->prenoms $prenoms;
  120.         return $this;
  121.     }
  122.     public function getSexe(): ?string
  123.     {
  124.         return $this->sexe;
  125.     }
  126.     public function setSexe(?string $sexe): self
  127.     {
  128.         $this->sexe $sexe;
  129.         return $this;
  130.     }
  131.     public function getCivilite(): ?string
  132.     {
  133.         return $this->civilite;
  134.     }
  135.     public function setCivilite(?string $civilite): self
  136.     {
  137.         $this->civilite $civilite;
  138.         return $this;
  139.     }
  140.     public function getDateNaissance(): ?\DateTimeInterface
  141.     {
  142.         return $this->dateNaissance;
  143.     }
  144.     public function setDateNaissance(?\DateTimeInterface $dateNaissance): self
  145.     {
  146.         $this->dateNaissance $dateNaissance;
  147.         return $this;
  148.     }
  149.     public function getVille(): ?string
  150.     {
  151.         return $this->ville;
  152.     }
  153.     public function setVille(?string $ville): self
  154.     {
  155.         $this->ville $ville;
  156.         return $this;
  157.     }
  158.     public function getPays(): ?string
  159.     {
  160.         return $this->pays;
  161.     }
  162.     public function setPays(?string $pays): self
  163.     {
  164.         $this->pays $pays;
  165.         return $this;
  166.     }
  167.     public function getTelephone(): ?string
  168.     {
  169.         return $this->telephone;
  170.     }
  171.     public function setTelephone(?string $telephone): self
  172.     {
  173.         $this->telephone $telephone;
  174.         return $this;
  175.     }
  176.     public function getEmail(): ?string
  177.     {
  178.         return $this->email;
  179.     }
  180.     public function setEmail(?string $email): self
  181.     {
  182.         $this->email $email;
  183.         return $this;
  184.     }
  185.     public function getDescription(): ?string
  186.     {
  187.         return $this->description;
  188.     }
  189.     public function setDescription(?string $description): self
  190.     {
  191.         $this->description $description;
  192.         return $this;
  193.     }
  194.     public function getBiographie(): ?string
  195.     {
  196.         return $this->biographie;
  197.     }
  198.     public function setBiographie(?string $biographie): self
  199.     {
  200.         $this->biographie $biographie;
  201.         return $this;
  202.     }
  203.     public function getNomSolution(): ?string
  204.     {
  205.         return $this->nomSolution;
  206.     }
  207.     public function setNomSolution(?string $nomSolution): self
  208.     {
  209.         $this->nomSolution $nomSolution;
  210.         return $this;
  211.     }
  212.     public function getPhoto(): ?string
  213.     {
  214.         return $this->photo;
  215.     }
  216.     public function setPhoto(?string $photo): self
  217.     {
  218.         $this->photo $photo;
  219.         return $this;
  220.     }
  221.     public function getVideo(): ?string
  222.     {
  223.         return $this->video;
  224.     }
  225.     public function setVideo(?string $video): self
  226.     {
  227.         $this->video $video;
  228.         return $this;
  229.     }
  230.     public function getAutorisation(): ?string
  231.     {
  232.         return $this->autorisation;
  233.     }
  234.     public function setAutorisation(?string $autorisation): self
  235.     {
  236.         $this->autorisation $autorisation;
  237.         return $this;
  238.     }
  239.     public function setImageFile(File $image null)
  240.     {
  241.         $this->imageFile $image;
  242.         // VERY IMPORTANT:
  243.         // It is required that at least one field changes if you are using Doctrine,
  244.         // otherwise the event listeners won't be called and the file is lost
  245.         if ($image) {
  246.             // if 'updatedAt' is not defined in your entity, use another property
  247.             //  $this->updatedAt = new \DateTime('now');
  248.         }
  249.     }
  250.     public function getImageFile()
  251.     {
  252.         return $this->imageFile;
  253.     }
  254.     public function setVideoFile(File $image null)
  255.     {
  256.         $this->videoFile $image;
  257.         // VERY IMPORTANT:
  258.         // It is required that at least one field changes if you are using Doctrine,
  259.         // otherwise the event listeners won't be called and the file is lost
  260.         if ($image) {
  261.             // if 'updatedAt' is not defined in your entity, use another property
  262.             //  $this->updatedAt = new \DateTime('now');
  263.         }
  264.     }
  265.     public function getVideoFile()
  266.     {
  267.         return $this->videoFile;
  268.     }
  269. }