<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\OneToOne;
use JMS\Serializer\Annotation\Groups;
/**
* @ORM\Table(name="ContentVideo", indexes={@ORM\Index(name="slug_idx", columns={"slug"}), @ORM\Index(name="title_idx", columns={"title"})})
*
* @ORM\Entity(repositoryClass="App\Repository\ContentVideoRepository")
*/
class ContentVideo extends ContentTypeAbstract
{
/**
* @ORM\Id()
*
* @ORM\GeneratedValue()
*
* @ORM\Column(type="integer")
*
* @Groups({"waitrating", "contentlist", "video_search"})
*/
private $id;
/**
* @Groups({"contentlist", "contentdetail", "video_search", "imageset_search"})
*
* @OneToOne(targetEntity="Content", mappedBy="video", cascade={"persist"})
*/
private $content;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $filename;
/**
* @Groups({"adminindex"})
*
* @ORM\Column(type="integer", nullable=true)
*/
private $filesize;
/**
* @ORM\Column(type="integer", nullable=true)
*
* @Groups({"contentlist", "video_search"})
*/
private $duration;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $previews_created_at;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({"contentlist", "video_search"})
*/
private $is_360p;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({"contentlist", "video_search"})
*/
private $is_720p;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({"contentlist", "video_search"})
*/
private $is_1080p;
/**
* @OneToOne(targetEntity="App\Entity\ContentVideoMeta",cascade={"persist"})
*
* @JoinColumn(name="video_meta_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $video_meta;
public function getId()
{
return $this->id;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(?string $filename): self
{
$this->filename = $filename;
return $this;
}
public function getFilesize(): ?int
{
return $this->filesize;
}
public function setFilesize(?int $filesize): self
{
$this->filesize = $filesize;
return $this;
}
public function getDuration(): ?int
{
return $this->duration;
}
public function setDuration(?int $duration): self
{
$this->duration = $duration;
return $this;
}
public function getPreviewsCreatedAt(): ?\DateTimeInterface
{
return $this->previews_created_at;
}
public function setPreviewsCreatedAt(?\DateTimeInterface $previews_created_at): self
{
$this->previews_created_at = $previews_created_at;
return $this;
}
public function setContent(?Content $content): self
{
$this->content = $content;
return $this;
}
public function getContent(): ?Content
{
return $this->content;
}
public function setIs1080p(bool $is_1080p): self
{
$this->is_1080p = $is_1080p;
return $this;
}
public function getIs1080p(): ?bool
{
return $this->is_1080p;
}
public function setIs360p(bool $is_360p): self
{
$this->is_360p = $is_360p;
return $this;
}
public function getIs360p(): ?bool
{
return $this->is_360p;
}
public function setIs720p(bool $is_720p): self
{
$this->is_720p = $is_720p;
return $this;
}
public function getIs720p(): ?bool
{
return $this->is_720p;
}
public function setVideoMeta(?ContentVideoMeta $video_meta): self
{
$this->video_meta = $video_meta;
return $this;
}
public function getVideoMeta(): ?ContentVideoMeta
{
return $this->video_meta;
}
}