Implermented front page and set public

This commit is contained in:
Michel 2024-11-04 16:31:21 +01:00
parent 15a9dcf09b
commit d6ebf8f4ff
18 changed files with 658 additions and 23 deletions
src/php/Entities

View file

@ -10,7 +10,7 @@ use GamesShop\Entities\Account\User;
#[ORM\Entity]
#[ORM\Table(name: 'games_lists')]
final class GamesList
class GamesList
{
#[ORM\Id]
#[ORM\Column(type: 'integer', options: ['unsigned' => true])]
@ -27,6 +27,9 @@ final class GamesList
#[ORM\JoinColumn(name: 'id', referencedColumnName: 'id')]
#[ORM\ManyToMany(targetEntity: User::class)]
private Collection $claimer;
#[ORM\Column(type: 'integer', options: ['unsigned' => true, 'default' => 0])]
private bool $isPublic = false;
/**
* @param User $owner
@ -60,6 +63,14 @@ final class GamesList
return $this->claimer;
}
public function isPublic(): bool {
return $this->isPublic;
}
public function setIsPublic(bool $isPublic): void {
$this->isPublic = $isPublic;
}
public function addClaimer(User $claimer): void
{
$this->claimer[] = $claimer;