Messages handling voor spel 1
This commit is contained in:
67
src/Game/Entity/Game.php
Normal file
67
src/Game/Entity/Game.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user