<?php
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\SlideRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: SlideRepository::class)]
#[ApiResource]
class Slide
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $name = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $content = null;
#[ORM\ManyToOne(inversedBy: 'slides')]
private ?MediaObject $media = null;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): static
{
$this->name = $name;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): static
{
$this->content = $content;
return $this;
}
public function getMedia(): ?MediaObject
{
return $this->media;
}
public function setMedia(?MediaObject $media): static
{
$this->media = $media;
return $this;
}
}