83 lines
1.6 KiB
PHP
83 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\User\Framework\Entity;
|
|
|
|
use App\User\Framework\Repository\PreferenceOptionRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Component\Serializer\Attribute\Ignore;
|
|
|
|
#[ORM\Entity(repositoryClass: PreferenceOptionRepository::class)]
|
|
class PreferenceOption
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $name = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $value = null;
|
|
|
|
#[Ignore]
|
|
#[ORM\ManyToOne(inversedBy: 'preferenceOptions')]
|
|
private ?Preference $preference = null;
|
|
|
|
#[ORM\Column]
|
|
private ?bool $enabled = 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 getValue(): ?string
|
|
{
|
|
return $this->value;
|
|
}
|
|
|
|
public function setValue(?string $value): static
|
|
{
|
|
$this->value = $value;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPreference(): ?Preference
|
|
{
|
|
return $this->preference;
|
|
}
|
|
|
|
public function setPreference(?Preference $preference): static
|
|
{
|
|
$this->preference = $preference;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isEnabled(): ?bool
|
|
{
|
|
return $this->enabled;
|
|
}
|
|
|
|
public function setEnabled(bool $enabled): static
|
|
{
|
|
$this->enabled = $enabled;
|
|
|
|
return $this;
|
|
}
|
|
}
|