src/Entity/Core/Video.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use JsonSerializable;
  5. #[ORM\Table('video')]
  6. #[ORM\Entity]
  7. class Video implements JsonSerializable
  8. {
  9. #[ORM\Column(type: 'integer')]
  10. #[ORM\Id]
  11. #[ORM\GeneratedValue]
  12. private int $id;
  13. #[ORM\Column]
  14. private string $title;
  15. #[ORM\Column]
  16. private string $url;
  17. public function getTitle(): string
  18. {
  19. return $this->title;
  20. }
  21. public function getUrl(): string
  22. {
  23. return $this->url;
  24. }
  25. public function jsonSerialize(): mixed
  26. {
  27. return [
  28. "title" => $this->title,
  29. "url" => $this->url,
  30. ];
  31. }
  32. }