src/Entity/UserVideoTimecode.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiFilter;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use ApiPlatform\Core\Annotation\ApiSubresource;
  6. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  7. use ApiPlatform\Core\Serializer\Filter\PropertyFilter;
  8. use App\Repository\UserVideoTimecodeRepository;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Symfony\Component\Serializer\Annotation\Groups;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. /**
  14.  * @ORM\Entity(repositoryClass=UserVideoTimecodeRepository::class)
  15.  */
  16. class UserVideoTimecode
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=TvUser::class, inversedBy="userVideoTimecodes")
  26.      * @ORM\JoinColumn(nullable=true)
  27.      */
  28.     private $tvUser;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userVideoTimecodes")
  31.      * @ORM\JoinColumn(nullable=true)
  32.      * @Assert\NotNull
  33.      * @Groups({"user_video_timecode:read", "user_video_timecode:write"})
  34.      */
  35.     private $user;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=Video::class, inversedBy="userVideoTimecodes")
  38.      * @ORM\JoinColumn(nullable=false)
  39.      * @Groups({"user_video_timecode:read", "user_video_timecode:write"})
  40.      */
  41.     private $video;
  42.     /**
  43.      * @ORM\Column(type="integer")
  44.      * @Groups({"user_video_timecode:read", "user_video_timecode:write"})
  45.      */
  46.     private $timecode;
  47.     /**
  48.      * @ORM\Column(type="datetime")
  49.      * @Gedmo\Timestampable(on="create")
  50.      */
  51.     private $createdAt;
  52.     /**
  53.      * @ORM\Column(type="datetime")
  54.      * @Gedmo\Timestampable(on="update")
  55.      */
  56.     private $updatedAt;
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getTvUser(): ?TvUser
  62.     {
  63.         return $this->tvUser;
  64.     }
  65.     public function setTvUser(?TvUser $tvUser): self
  66.     {
  67.         $this->tvUser $tvUser;
  68.         return $this;
  69.     }
  70.     public function getUser(): ?User
  71.     {
  72.         return $this->user;
  73.     }
  74.     public function setUser(?User $user): self
  75.     {
  76.         $this->user $user;
  77.         return $this;
  78.     }
  79.     public function getVideo(): ?Video
  80.     {
  81.         return $this->video;
  82.     }
  83.     public function setVideo(?Video $video): self
  84.     {
  85.         $this->video $video;
  86.         return $this;
  87.     }
  88.     public function getTimecode(): ?int
  89.     {
  90.         return $this->timecode;
  91.     }
  92.     public function setTimecode(int $timecode): self
  93.     {
  94.         $this->timecode $timecode;
  95.         return $this;
  96.     }
  97.     public function getCreatedAt(): ?\DateTimeInterface
  98.     {
  99.         return $this->createdAt;
  100.     }
  101.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  102.     {
  103.         $this->createdAt $createdAt;
  104.         return $this;
  105.     }
  106.     public function getUpdatedAt(): ?\DateTimeInterface
  107.     {
  108.         return $this->updatedAt;
  109.     }
  110.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  111.     {
  112.         $this->updatedAt $updatedAt;
  113.         return $this;
  114.     }
  115. }