src/Entity/ContentVideo.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\ORM\Mapping\JoinColumn;
  5. use Doctrine\ORM\Mapping\OneToOne;
  6. use JMS\Serializer\Annotation\Groups;
  7. /**
  8.  * @ORM\Table(name="ContentVideo", indexes={@ORM\Index(name="slug_idx", columns={"slug"}), @ORM\Index(name="title_idx", columns={"title"})})
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\Repository\ContentVideoRepository")
  11.  */
  12. class ContentVideo extends ContentTypeAbstract
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      *
  17.      * @ORM\GeneratedValue()
  18.      *
  19.      * @ORM\Column(type="integer")
  20.      *
  21.      * @Groups({"waitrating", "contentlist", "video_search"})
  22.      */
  23.     private $id;
  24.     /**
  25.      * @Groups({"contentlist", "contentdetail", "video_search", "imageset_search"})
  26.      *
  27.      * @OneToOne(targetEntity="Content", mappedBy="video", cascade={"persist"})
  28.      */
  29.     private $content;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $filename;
  34.     /**
  35.      * @Groups({"adminindex"})
  36.      *
  37.      * @ORM\Column(type="integer", nullable=true)
  38.      */
  39.     private $filesize;
  40.     /**
  41.      * @ORM\Column(type="integer", nullable=true)
  42.      *
  43.      * @Groups({"contentlist", "video_search"})
  44.      */
  45.     private $duration;
  46.     /**
  47.      * @ORM\Column(type="datetime", nullable=true)
  48.      */
  49.     private $previews_created_at;
  50.     /**
  51.      * @ORM\Column(type="boolean", nullable=true)
  52.      *
  53.      * @Groups({"contentlist", "video_search"})
  54.      */
  55.     private $is_360p;
  56.     /**
  57.      * @ORM\Column(type="boolean", nullable=true)
  58.      *
  59.      * @Groups({"contentlist", "video_search"})
  60.      */
  61.     private $is_720p;
  62.     /**
  63.      * @ORM\Column(type="boolean", nullable=true)
  64.      *
  65.      * @Groups({"contentlist", "video_search"})
  66.      */
  67.     private $is_1080p;
  68.     /**
  69.      * @OneToOne(targetEntity="App\Entity\ContentVideoMeta",cascade={"persist"})
  70.      *
  71.      * @JoinColumn(name="video_meta_id", referencedColumnName="id", onDelete="SET NULL")
  72.      */
  73.     private $video_meta;
  74.     public function getId()
  75.     {
  76.         return $this->id;
  77.     }
  78.     public function getFilename(): ?string
  79.     {
  80.         return $this->filename;
  81.     }
  82.     public function setFilename(?string $filename): self
  83.     {
  84.         $this->filename $filename;
  85.         return $this;
  86.     }
  87.     public function getFilesize(): ?int
  88.     {
  89.         return $this->filesize;
  90.     }
  91.     public function setFilesize(?int $filesize): self
  92.     {
  93.         $this->filesize $filesize;
  94.         return $this;
  95.     }
  96.     public function getDuration(): ?int
  97.     {
  98.         return $this->duration;
  99.     }
  100.     public function setDuration(?int $duration): self
  101.     {
  102.         $this->duration $duration;
  103.         return $this;
  104.     }
  105.     public function getPreviewsCreatedAt(): ?\DateTimeInterface
  106.     {
  107.         return $this->previews_created_at;
  108.     }
  109.     public function setPreviewsCreatedAt(?\DateTimeInterface $previews_created_at): self
  110.     {
  111.         $this->previews_created_at $previews_created_at;
  112.         return $this;
  113.     }
  114.     public function setContent(?Content $content): self
  115.     {
  116.         $this->content $content;
  117.         return $this;
  118.     }
  119.     public function getContent(): ?Content
  120.     {
  121.         return $this->content;
  122.     }
  123.     public function setIs1080p(bool $is_1080p): self
  124.     {
  125.         $this->is_1080p $is_1080p;
  126.         return $this;
  127.     }
  128.     public function getIs1080p(): ?bool
  129.     {
  130.         return $this->is_1080p;
  131.     }
  132.     public function setIs360p(bool $is_360p): self
  133.     {
  134.         $this->is_360p $is_360p;
  135.         return $this;
  136.     }
  137.     public function getIs360p(): ?bool
  138.     {
  139.         return $this->is_360p;
  140.     }
  141.     public function setIs720p(bool $is_720p): self
  142.     {
  143.         $this->is_720p $is_720p;
  144.         return $this;
  145.     }
  146.     public function getIs720p(): ?bool
  147.     {
  148.         return $this->is_720p;
  149.     }
  150.     public function setVideoMeta(?ContentVideoMeta $video_meta): self
  151.     {
  152.         $this->video_meta $video_meta;
  153.         return $this;
  154.     }
  155.     public function getVideoMeta(): ?ContentVideoMeta
  156.     {
  157.         return $this->video_meta;
  158.     }
  159. }