src/Entity/Videos.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VideosRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. #[ORM\Entity(repositoryClassVideosRepository::class)]
  10. #[Vich\Uploadable]
  11. class Videos
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $videoName null;
  19.     #[ORM\ManyToOne(inversedBy'videos')]
  20.     private ?PropertyList $property_videos null;
  21.     #[ORM\ManyToOne(inversedBy'videos')]
  22.     private ?Bedroom $bedroom_videos null;
  23.     //#[ORM\Column(length: 255, nullable: true)]
  24.     #[Vich\UploadableField(mapping'property_videos'fileNameProperty'videoName')]
  25.     private ?File $videoFile null;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getVideoName(): ?string
  31.     {
  32.         return $this->videoName;
  33.     }
  34.     public function setVideoName(string $videoName): self
  35.     {
  36.         $this->videoName $videoName;
  37.         return $this;
  38.     }
  39.     public function getPropertyVideos(): ?PropertyList
  40.     {
  41.         return $this->property_videos;
  42.     }
  43.     public function setPropertyVideos(?PropertyList $property_videos): self
  44.     {
  45.         $this->property_videos $property_videos;
  46.         return $this;
  47.     }
  48.     public function getBedroomVideos(): ?Bedroom
  49.     {
  50.         return $this->bedroom_videos;
  51.     }
  52.     public function setBedroomVideos(?Bedroom $bedroom_videos): self
  53.     {
  54.         $this->bedroom_videos $bedroom_videos;
  55.         return $this;
  56.     }
  57.     public function getVideoFile(): ?File
  58.     {
  59.         return $this->videoFile;
  60.     }
  61.       /**
  62.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $videoFile
  63.      */
  64.     public function setVideoFile(?File $videoFile null): void
  65.     {
  66.         $this->videoFile $videoFile;
  67.         //return $this;
  68.     }
  69. }