Files
Escapepage/src/Game/Entity/GameSetting.php
2026-01-05 23:37:36 +01:00

69 lines
1.3 KiB
PHP

<?php
namespace App\Game\Entity;
use App\Game\Enum\GameSettingType;
use App\Game\Repository\GameSettingRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: GameSettingRepository::class)]
#[ORM\Table(name: 'game_setting')]
class GameSetting
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: Game::class)]
#[ORM\JoinColumn(nullable: false)]
private ?Game $game = null;
#[ORM\Column(type: 'string', length: 255, enumType: GameSettingType::class)]
private ?GameSettingType $name = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $value = null;
public function getId(): ?int
{
return $this->id;
}
public function getGame(): ?Game
{
return $this->game;
}
public function setGame(?Game $game): static
{
$this->game = $game;
return $this;
}
public function getName(): ?GameSettingType
{
return $this->name;
}
public function setName(GameSettingType $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;
}
}