Files
SomniaRooms/src/Entity/ConfigVariable.php
T
Daniel-Garmig 09f384fce0 DB changed.
- Removed RoomCategoryDetails.
- Updated some constraints and fields.
2024-09-09 13:44:18 +02:00

65 lines
1.3 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\ConfigVariableRepository;
use App\Enum\ConfigSectionType;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ConfigVariableRepository::class)]
class ConfigVariable
{
#[ORM\Id]
#[ORM\GeneratedValue("NONE")]
#[ORM\Column(length: 32, unique: true, nullable: false)]
private string $key = "";
#[ORM\Column(length: 255, nullable: false)]
private ?string $value = null;
#[ORM\Column(type: 'string', enumType: ConfigSectionType::class, nullable: false)]
private ConfigSectionType $section = ConfigSectionType::General;
public function getKey(): string
{
return $this->key;
}
public function setKey(string $key): static
{
$this->key = $key;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(string $value): static
{
$this->value = $value;
return $this;
}
public function getSection(): ConfigSectionType
{
return $this->section;
}
public function setSection(ConfigSectionType $section): static
{
$this->section = $section;
return $this;
}
function __toString(): string
{
return $this->getKey();
}
}