Files
tonehaus/src/Entity/Setting.php
boris 054e970df9
All checks were successful
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m55s
what the fuck
2025-11-27 20:03:12 +00:00

71 lines
1.4 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\SettingRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Setting stores lightweight key/value configuration entries.
*/
#[ORM\Entity(repositoryClass: SettingRepository::class)]
#[ORM\Table(name: 'settings')]
#[ORM\UniqueConstraint(name: 'uniq_setting_name', columns: ['name'])]
class Setting
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', length: 100)]
#[Assert\NotBlank]
private string $name = '';
#[ORM\Column(type: 'text', nullable: true)]
private ?string $value = null;
/**
* Returns the unique identifier.
*/
public function getId(): ?int
{
return $this->id;
}
/**
* Returns the configuration key.
*/
public function getName(): string
{
return $this->name;
}
/**
* Sets the configuration key.
*/
public function setName(string $name): void
{
$this->name = $name;
}
/**
* Returns the stored configuration value.
*/
public function getValue(): ?string
{
return $this->value;
}
/**
* Sets the stored configuration value.
*/
public function setValue(?string $value): void
{
$this->value = $value;
}
}