<?php
namespace CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
/**
* @ORM\Table("video")
* @ORM\Entity
*/
class Video implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private int $id;
/** @ORM\Column */
private string $title;
/** @ORM\Column */
private string $url;
public function getTitle(): string
{
return $this->title;
}
public function getUrl(): string
{
return $this->url;
}
public function jsonSerialize(): mixed
{
return [
"title" => $this->title,
"url" => $this->url,
];
}
}