<?php
namespace App\Entity;
use App\Repository\UsercontentRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: UsercontentRepository::class)]
class Usercontent
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $title;
#[ORM\Column(type: 'json')]
private $content = [];
#[ORM\Column(type: 'text')]
private $html;
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'usercontents')]
#[ORM\JoinColumn(nullable: false)]
private $user;
#[ORM\ManyToOne(targetEntity: Image::class)]
private $titleImage;
#[ORM\Column(type: 'boolean')]
private $published = false;
#[ORM\Column(type: 'text', nullable: true)]
private $abstract;
#[ORM\OneToOne(targetEntity: Content::class, cascade: ['persist', 'remove'])]
private $content_reference;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $slug;
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getContent(): ?array
{
return $this->content;
}
public function setContent(array $content): self
{
$this->content = $content;
return $this;
}
public function getHtml(): ?string
{
return $this->html;
}
public function setHtml(string $html): self
{
$this->html = $html;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getTitleImage(): ?Image
{
return $this->titleImage;
}
public function setTitleImage(?Image $titleImage): self
{
$this->titleImage = $titleImage;
return $this;
}
public function getPublished(): ?bool
{
return $this->published;
}
public function setPublished(bool $published): self
{
$this->published = $published;
return $this;
}
public function getAbstract(): ?string
{
return $this->abstract;
}
public function setAbstract(?string $abstract): self
{
$this->abstract = $abstract;
return $this;
}
public function getContentReference(): ?Content
{
return $this->content_reference;
}
public function setContentReference(?Content $content_reference): self
{
$this->content_reference = $content_reference;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
}