<?php
namespace App\Entity;
use App\Repository\VideosRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: VideosRepository::class)]
#[Vich\Uploadable]
class Videos
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $videoName = null;
#[ORM\ManyToOne(inversedBy: 'videos')]
private ?PropertyList $property_videos = null;
#[ORM\ManyToOne(inversedBy: 'videos')]
private ?Bedroom $bedroom_videos = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'property_videos', fileNameProperty: 'videoName')]
private ?File $videoFile = null;
public function getId(): ?int
{
return $this->id;
}
public function getVideoName(): ?string
{
return $this->videoName;
}
public function setVideoName(string $videoName): self
{
$this->videoName = $videoName;
return $this;
}
public function getPropertyVideos(): ?PropertyList
{
return $this->property_videos;
}
public function setPropertyVideos(?PropertyList $property_videos): self
{
$this->property_videos = $property_videos;
return $this;
}
public function getBedroomVideos(): ?Bedroom
{
return $this->bedroom_videos;
}
public function setBedroomVideos(?Bedroom $bedroom_videos): self
{
$this->bedroom_videos = $bedroom_videos;
return $this;
}
public function getVideoFile(): ?File
{
return $this->videoFile;
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $videoFile
*/
public function setVideoFile(?File $videoFile = null): void
{
$this->videoFile = $videoFile;
//return $this;
}
}