<?php
namespace App\Entity;
use App\Entity\Traits\LifecycleTrait;
use App\Repository\BasePageRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: BasePageRepository::class)]
class BasePage
{
use LifecycleTrait;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private int $id;
#[ORM\Column(type: 'string', length: 255)]
private ?string $title;
#[ORM\Column(type: 'text')]
private ?string $body;
#[ORM\Column(type: 'string', length: 255)]
private ?string $slug;
#[ORM\Column(type: 'boolean')]
private ?bool $published;
public function __construct()
{
$this->published = 1;
$this->lifeCycleTraitInit();
}
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 getBody(): ?string
{
return $this->body;
}
public function setBody(string $body): self
{
$this->body = $body;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getPublished(): ?bool
{
return $this->published;
}
public function setPublished(bool $published): self
{
$this->published = $published;
return $this;
}
}