<?phpnamespace App\Entity;use ApiPlatform\Core\Annotation\ApiFilter;use ApiPlatform\Core\Annotation\ApiResource;use ApiPlatform\Core\Annotation\ApiSubresource;use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;use ApiPlatform\Core\Serializer\Filter\PropertyFilter;use App\Repository\UserVideoTimecodeRepository;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;use Symfony\Component\Serializer\Annotation\Groups;use Symfony\Component\Validator\Constraints as Assert;/** * @ORM\Entity(repositoryClass=UserVideoTimecodeRepository::class) */class UserVideoTimecode{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=TvUser::class, inversedBy="userVideoTimecodes") * @ORM\JoinColumn(nullable=true) */ private $tvUser; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userVideoTimecodes") * @ORM\JoinColumn(nullable=true) * @Assert\NotNull * @Groups({"user_video_timecode:read", "user_video_timecode:write"}) */ private $user; /** * @ORM\ManyToOne(targetEntity=Video::class, inversedBy="userVideoTimecodes") * @ORM\JoinColumn(nullable=false) * @Groups({"user_video_timecode:read", "user_video_timecode:write"}) */ private $video; /** * @ORM\Column(type="integer") * @Groups({"user_video_timecode:read", "user_video_timecode:write"}) */ private $timecode; /** * @ORM\Column(type="datetime") * @Gedmo\Timestampable(on="create") */ private $createdAt; /** * @ORM\Column(type="datetime") * @Gedmo\Timestampable(on="update") */ private $updatedAt; public function getId(): ?int { return $this->id; } public function getTvUser(): ?TvUser { return $this->tvUser; } public function setTvUser(?TvUser $tvUser): self { $this->tvUser = $tvUser; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getVideo(): ?Video { return $this->video; } public function setVideo(?Video $video): self { $this->video = $video; return $this; } public function getTimecode(): ?int { return $this->timecode; } public function setTimecode(int $timecode): self { $this->timecode = $timecode; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; }}