src/Entity/Images.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ImagesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ImagesRepository::class)
  9.  * @Vich\Uploadable
  10.  */
  11. class Images
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=50, nullable=true)
  21.      */
  22.     private $thumbail;
  23.     /**
  24.      * @Vich\UploadableField(mapping="thumbail_upload", fileNameProperty="thumbail")
  25.      */
  26.     public $thumbailFile;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity=Voiture::class, inversedBy="images")
  29.      */
  30.     private $voiture;
  31.     public function getVoiture(): ?Voiture
  32.     {
  33.         return $this->voiture;
  34.     }
  35.     public function setVoiture(?Voiture $voiture): self
  36.     {
  37.         $this->voiture $voiture;
  38.         return $this;
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getThumbail(): ?string
  45.     {
  46.         return $this->thumbail;
  47.     }
  48.     public function setThumbail(?string $thumbail): self
  49.     {
  50.         $this->thumbail $thumbail;
  51.         return $this;
  52.     }
  53.     /**
  54.     @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $imageFile
  55.      * @return $this
  56.      */
  57.     public function setThumbailFile$file): self
  58.     {
  59.         $this->thumbailFile $file;
  60.         return $this;
  61.     }
  62. }