70 lines
1.3 KiB
PHP
70 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Game\Entity;
|
|
|
|
use App\Game\Repository\PlayerRepository;
|
|
use App\Tech\Entity\User;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: PlayerRepository::class)]
|
|
#[ORM\Table(name: 'player')]
|
|
class Player
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\ManyToOne(targetEntity: Session::class)]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?Session $session = null;
|
|
|
|
#[ORM\ManyToOne(targetEntity: User::class)]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?User $user = null;
|
|
|
|
#[ORM\Column]
|
|
private ?int $screen = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getSession(): ?Session
|
|
{
|
|
return $this->session;
|
|
}
|
|
|
|
public function setSession(?Session $session): static
|
|
{
|
|
$this->session = $session;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getUser(): ?User
|
|
{
|
|
return $this->user;
|
|
}
|
|
|
|
public function setUser(?User $user): static
|
|
{
|
|
$this->user = $user;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getScreen(): ?int
|
|
{
|
|
return $this->screen;
|
|
}
|
|
|
|
public function setScreen(int $screen): static
|
|
{
|
|
$this->screen = $screen;
|
|
|
|
return $this;
|
|
}
|
|
}
|