I lowkey forgot to commit
This commit is contained in:
33
src/Entity/Setting.php
Normal file
33
src/Entity/Setting.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\SettingRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[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;
|
||||
|
||||
public function getId(): ?int { return $this->id; }
|
||||
public function getName(): string { return $this->name; }
|
||||
public function setName(string $name): void { $this->name = $name; }
|
||||
public function getValue(): ?string { return $this->value; }
|
||||
public function setValue(?string $value): void { $this->value = $value; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user