src/Entity/ItemVideo.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\CommonTrait;
  4. use App\Repository\ItemVideoRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ItemVideoRepository::class)
  9.  * @ORM\Table(name="itm_video")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @UniqueEntity({"uuid"})
  12.  */
  13. class ItemVideo
  14. {
  15.     use CommonTrait;
  16.     /**
  17.      * @ORM\OneToOne(targetEntity=Item::class, inversedBy="itemVideo", cascade={"persist", "remove"})
  18.      */
  19.     private $item;
  20.     /**
  21.      * @ORM\Column(type="boolean", nullable=true)
  22.      */
  23.     private $isVerified;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $youtubeId;
  28.     /**
  29.      * @ORM\Column(type="boolean", nullable=true)
  30.      */
  31.     private $isUploadedToYT;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $name;
  36.     /**
  37.      * @ORM\OneToOne(targetEntity=File::class, cascade={"persist", "remove"})
  38.      */
  39.     private $file;
  40.     /**
  41.      * @ORM\Column(type="boolean", nullable=true)
  42.      */
  43.     private $isVerifiedOk;
  44.     public function __toString()
  45.     {
  46.         return $this->getName();
  47.     }
  48.     public function getItem(): ?Item
  49.     {
  50.         return $this->item;
  51.     }
  52.     public function setItem(?Item $item): self
  53.     {
  54.         $this->item $item;
  55.         return $this;
  56.     }
  57.     public function getIsVerified(): ?bool
  58.     {
  59.         return $this->isVerified;
  60.     }
  61.     public function setIsVerified(?bool $isVerified): self
  62.     {
  63.         $this->isVerified $isVerified;
  64.         return $this;
  65.     }
  66.     public function getYoutubeId(): ?string
  67.     {
  68.         return $this->youtubeId;
  69.     }
  70.     public function setYoutubeId(?string $youtubeId): self
  71.     {
  72.         $this->youtubeId $youtubeId;
  73.         return $this;
  74.     }
  75.     public function getIsUploadedToYT(): ?bool
  76.     {
  77.         return $this->isUploadedToYT;
  78.     }
  79.     public function setIsUploadedToYT(?bool $isUploadedToYT): self
  80.     {
  81.         $this->isUploadedToYT $isUploadedToYT;
  82.         return $this;
  83.     }
  84.     public function getName(): ?string
  85.     {
  86.         return $this->name;
  87.     }
  88.     public function setName(?string $name): self
  89.     {
  90.         $this->name $name;
  91.         return $this;
  92.     }
  93.     public function getFile(): ?File
  94.     {
  95.         return $this->file;
  96.     }
  97.     public function setFile(?File $file): self
  98.     {
  99.         $this->file $file;
  100.         return $this;
  101.     }
  102.     public function getIsVerifiedOk(): ?bool
  103.     {
  104.         return $this->isVerifiedOk;
  105.     }
  106.     public function setIsVerifiedOk(?bool $isVerifiedOk): self
  107.     {
  108.         $this->isVerifiedOk $isVerifiedOk;
  109.         return $this;
  110.     }
  111. }