<?php
namespace App\Entity\Shop\Page;
use App\Entity\BaseEntity;
use App\Entity\Shop\Shop\Shop;
use App\Repository\Shop\Page\PageRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: PageRepository::class)]
class Page extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private ?string $id;
#[ORM\Column(length: 255)]
private ?string $title = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $imageUrl = null;
#[ORM\ManyToOne(inversedBy: 'pages')]
#[ORM\JoinColumn(nullable: false)]
private ?Shop $shop = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $content = null;
public function __construct()
{
parent::__construct();
}
public function getId(): ?string
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): static
{
$this->title = $title;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getImageUrl(): ?string
{
return $this->imageUrl;
}
public function setImageUrl(?string $imageUrl): static
{
$this->imageUrl = $imageUrl;
return $this;
}
public function getShop(): ?Shop
{
return $this->shop;
}
public function setShop(?Shop $shop): static
{
$this->shop = $shop;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): static
{
$this->content = $content;
return $this;
}
}