Messages handling voor spel 1

This commit is contained in:
Frank
2026-01-05 15:27:37 +01:00
parent c0aa2ad44e
commit af13be2196
16 changed files with 681 additions and 1 deletions

67
src/Game/Entity/Game.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
namespace App\Game\Entity;
use App\Game\Enum\GameStatus;
use App\Game\Repository\GameRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: GameRepository::class)]
#[ORM\Table(name: 'game')]
class Game
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column]
private ?int $numberOfPlayers = null;
#[ORM\Column(type: 'string', length: 20, enumType: GameStatus::class)]
private ?GameStatus $status = 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 getNumberOfPlayers(): ?int
{
return $this->numberOfPlayers;
}
public function setNumberOfPlayers(int $numberOfPlayers): static
{
$this->numberOfPlayers = $numberOfPlayers;
return $this;
}
public function getStatus(): ?GameStatus
{
return $this->status;
}
public function setStatus(GameStatus $status): static
{
$this->status = $status;
return $this;
}
}