websocket init

This commit is contained in:
2024-03-15 15:44:29 +01:00
parent 11c6d4635f
commit 13c9c8bd3d
15 changed files with 332 additions and 25 deletions

View File

@ -2,6 +2,8 @@
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
@ -85,6 +87,16 @@ class Scrumissue
*/
private $scrumsprint;
/**
* @ORM\OneToMany(targetEntity="Userpoker", mappedBy="scrumissue", cascade={"persist"}, orphanRemoval=true)
*/
private $userpokers;
public function __construct()
{
$this->userpokers = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
@ -234,6 +246,37 @@ class Scrumissue
return $this;
}
/**
* @return Collection|Userpoker[]
*/
public function getUserpokers(): Collection
{
return $this->userpokers;
}
public function addUserpoker(Userpoker $userpoker): self
{
if (!$this->userpokers->contains($userpoker)) {
$this->userpokers[] = $userpoker;
$userpoker->setScrumissue($this);
}
return $this;
}
public function removeUserpoker(Userpoker $userpoker): self
{
if ($this->userpokers->contains($userpoker)) {
$this->userpokers->removeElement($userpoker);
// set the owning side to null (unless already changed)
if ($userpoker->getScrumissue() === $this) {
$userpoker->setScrumissue(null);
}
}
return $this;
}
}