<?php
namespace App\Entity\Website;
use App\Entity\BaseEntity;
use App\Entity\Website\Website\Website;
use App\Repository\Website\SettingRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Table(name: '`shop_setting`')]
#[ORM\Entity(repositoryClass: SettingRepository::class)]
class Setting 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 $name = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $value = null;
#[ORM\ManyToOne(inversedBy: 'settings')]
#[ORM\JoinColumn(nullable: false)]
private ?Website $website = null;
public function getId(): ?string
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(string $value): static
{
$this->value = $value;
return $this;
}
public function getWebsite(): ?Website
{
return $this->website;
}
public function setWebsite(?Website $shop): static
{
$this->website = $shop;
return $this;
}
}