feat: add GameRow entity
This commit is contained in:
84
src/Entity/GameRow.php
Normal file
84
src/Entity/GameRow.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\GameRowRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: GameRowRepository::class)]
|
||||
class GameRow
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Game::class, inversedBy: 'rows')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Game $game = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Actor::class)]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Actor $actor = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private int $position;
|
||||
|
||||
#[ORM\Column]
|
||||
private int $rowOrder;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getGame(): ?Game
|
||||
{
|
||||
return $this->game;
|
||||
}
|
||||
|
||||
public function setGame(Game $game): static
|
||||
{
|
||||
$this->game = $game;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getActor(): ?Actor
|
||||
{
|
||||
return $this->actor;
|
||||
}
|
||||
|
||||
public function setActor(Actor $actor): static
|
||||
{
|
||||
$this->actor = $actor;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPosition(): int
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function setPosition(int $position): static
|
||||
{
|
||||
$this->position = $position;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRowOrder(): int
|
||||
{
|
||||
return $this->rowOrder;
|
||||
}
|
||||
|
||||
public function setRowOrder(int $rowOrder): static
|
||||
{
|
||||
$this->rowOrder = $rowOrder;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user