Private
Public Access
1
0

chg: dev: replace the legacy gos/web-socket-bundle & replace it with Mercure protocol #4

This commit is contained in:
2026-04-09 22:00:53 +02:00
parent b55c223d8a
commit 7219471a86
33 changed files with 1198 additions and 2324 deletions

View File

@@ -12,6 +12,8 @@ namespace App\Entity;
use App\Repository\PlayedGameRepository;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
@@ -19,6 +21,7 @@ use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\OneToOne;
/**
@@ -80,107 +83,28 @@ class PlayedGame
#[JoinColumn(name: 'blue_anon', referencedColumnName: 'id', nullable: true)]
private ?Gamer $blueAnon = null;
#[OneToOne(mappedBy: 'playedGame')]
private ?Step $step = null;
#[OneToMany(mappedBy: 'playedGame', targetEntity: Step::class)]
private Collection $steps;
public function __construct()
{
$this->steps = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function setId(?int $id): self
{
$this->id = $id;
return $this;
}
public function getGameAssoc(): ?string
{
return $this->gameAssoc;
}
public function setGameAssoc(?string $gameAssoc): self
public function setGameAssoc(?string $gameAssoc): void
{
$this->gameAssoc = $gameAssoc;
return $this;
}
public function getRedPoints(): ?int
{
return $this->redPoints;
}
public function setRedPoints(?int $redPoints): self
{
$this->redPoints = $redPoints;
return $this;
}
public function getBluePoints(): ?int
{
return $this->bluePoints;
}
public function setBluePoints(?int $bluePoints): self
{
$this->bluePoints = $bluePoints;
return $this;
}
public function getRedExplodedBomb(): ?bool
{
return $this->redExplodedBomb;
}
public function setRedExplodedBomb(?bool $redExplodedBomb): self
{
$this->redExplodedBomb = $redExplodedBomb;
return $this;
}
public function getBlueExplodedBomb(): ?bool
{
return $this->blueExplodedBomb;
}
public function setBlueExplodedBomb(?bool $blueExplodedBomb): self
{
$this->blueExplodedBomb = $blueExplodedBomb;
return $this;
}
public function getResign(): ?string
{
return $this->resign;
}
public function setResign(?string $resign): self
{
$this->resign = $resign;
return $this;
}
public function getCreated(): ?DateTime
{
return $this->created;
}
public function setCreated(?DateTime $created): self
{
$this->created = $created;
return $this;
}
public function getUpdated(): ?DateTime
{
return $this->updated;
}
public function setUpdated(?DateTime $updated): self
{
$this->updated = $updated;
return $this;
}
public function getGrid(): ?Grid
@@ -188,10 +112,9 @@ class PlayedGame
return $this->grid;
}
public function setGrid(?Grid $grid): self
public function setGrid(?Grid $grid): void
{
$this->grid = $grid;
return $this;
}
public function getRed(): ?User
@@ -199,10 +122,9 @@ class PlayedGame
return $this->red;
}
public function setRed(?User $red): self
public function setRed(?User $red): void
{
$this->red = $red;
return $this;
}
public function getRedAnon(): ?Gamer
@@ -210,10 +132,9 @@ class PlayedGame
return $this->redAnon;
}
public function setRedAnon(?Gamer $redAnon): self
public function setRedAnon(?Gamer $redAnon): void
{
$this->redAnon = $redAnon;
return $this;
}
public function getBlue(): ?User
@@ -221,10 +142,9 @@ class PlayedGame
return $this->blue;
}
public function setBlue(?User $blue): self
public function setBlue(?User $blue): void
{
$this->blue = $blue;
return $this;
}
public function getBlueAnon(): ?Gamer
@@ -232,20 +152,83 @@ class PlayedGame
return $this->blueAnon;
}
public function setBlueAnon(?Gamer $blueAnon): self
public function setBlueAnon(?Gamer $blueAnon): void
{
$this->blueAnon = $blueAnon;
return $this;
}
public function getStep(): ?Step
public function getRedPoints(): ?int
{
return $this->step;
return $this->redPoints;
}
public function setStep(?Step $step): self
public function setRedPoints(?int $redPoints): void
{
$this->step = $step;
return $this;
$this->redPoints = $redPoints;
}
public function getBluePoints(): ?int
{
return $this->bluePoints;
}
public function setBluePoints(?int $bluePoints): void
{
$this->bluePoints = $bluePoints;
}
public function getRedExplodedBomb(): ?bool
{
return $this->redExplodedBomb;
}
public function setRedExplodedBomb(?bool $redExplodedBomb): void
{
$this->redExplodedBomb = $redExplodedBomb;
}
public function getBlueExplodedBomb(): ?bool
{
return $this->blueExplodedBomb;
}
public function setBlueExplodedBomb(?bool $blueExplodedBomb): void
{
$this->blueExplodedBomb = $blueExplodedBomb;
}
public function getResign(): ?string
{
return $this->resign;
}
public function setResign(?string $resign): void
{
$this->resign = $resign;
}
public function getCreated(): ?DateTime
{
return $this->created;
}
public function setCreated(?DateTime $created): void
{
$this->created = $created;
}
public function getUpdated(): ?DateTime
{
return $this->updated;
}
public function setUpdated(?DateTime $updated): void
{
$this->updated = $updated;
}
public function getSteps(): Collection
{
return $this->steps;
}
}

View File

@@ -44,7 +44,7 @@ class Step
#[Column(nullable: true)]
private ?bool $wBomb = null;
#[ManyToOne(inversedBy: 'step')]
#[ManyToOne(inversedBy: 'steps')]
private ?PlayedGame $playedGame = null;
#[Column(type: Types::DATETIME_MUTABLE, nullable: true)]