Adds share feature

This commit is contained in:
Michel 2024-10-31 15:34:57 +01:00
parent 287c1f67c5
commit 15a9dcf09b
14 changed files with 379 additions and 23 deletions

View file

@ -3,6 +3,7 @@ declare(strict_types=1);
namespace GamesShop\Entities;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use GamesShop\Entities\Account\User;
@ -35,6 +36,7 @@ final class GamesList
{
$this->owner = $owner;
$this->name = $name;
$this->claimer = new ArrayCollection([$owner]);
}
@ -53,10 +55,13 @@ final class GamesList
return $this->name;
}
public function getClaimer(): array
public function getClaimer(): Collection
{
return $this->claimer;
}
public function addClaimer(User $claimer): void
{
$this->claimer[] = $claimer;
}
}