2019-10-27 13:35:33 +01:00
|
|
|
<?php
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* This file is part of the SplendidBear Websites' projects.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2019 @ www.splendidbear.org
|
|
|
|
|
*
|
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
|
*/
|
2019-10-27 13:35:33 +01:00
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
|
|
/**
|
2019-10-27 18:51:03 +01:00
|
|
|
* Class Grid
|
|
|
|
|
*
|
|
|
|
|
* @package App\Entity
|
|
|
|
|
* @author system7 <https://www.splendidbear.org>
|
|
|
|
|
*
|
2019-10-27 13:35:33 +01:00
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\GridRepository")
|
|
|
|
|
*/
|
|
|
|
|
class Grid
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @ORM\Id()
|
|
|
|
|
* @ORM\GeneratedValue()
|
|
|
|
|
* @ORM\Column(type="integer")
|
|
|
|
|
*/
|
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var PlayedGame|null
|
|
|
|
|
*
|
|
|
|
|
* @ORM\OneToOne(targetEntity="App\Entity\PlayedGame", inversedBy="grid", cascade={"persist"})
|
|
|
|
|
*/
|
|
|
|
|
private $playedGame;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var GridRow|null
|
|
|
|
|
*
|
|
|
|
|
* @ORM\OneToMany(targetEntity="App\Entity\GridRow", mappedBy="grid", cascade={"persist"})
|
|
|
|
|
* @ORM\JoinColumn(name="grid_row", referencedColumnName="id", onDelete="CASCADE")
|
|
|
|
|
*/
|
|
|
|
|
private $gridRow;
|
|
|
|
|
|
|
|
|
|
public function getId(): ?int
|
|
|
|
|
{
|
|
|
|
|
return $this->id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return PlayedGame|null
|
|
|
|
|
*/
|
|
|
|
|
public function getPlayedGame()
|
|
|
|
|
{
|
|
|
|
|
return $this->playedGame;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param PlayedGame|null $playedGame
|
|
|
|
|
*/
|
|
|
|
|
public function setPlayedGame( $playedGame): void
|
|
|
|
|
{
|
|
|
|
|
$this->playedGame = $playedGame;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return GridRow|null
|
|
|
|
|
*/
|
|
|
|
|
public function getGridRow()
|
|
|
|
|
{
|
|
|
|
|
return $this->gridRow;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param GridRow|null $gridRow
|
|
|
|
|
*/
|
|
|
|
|
public function setGridRow( $gridRow): void
|
|
|
|
|
{
|
|
|
|
|
$this->gridRow = $gridRow;
|
|
|
|
|
}
|
|
|
|
|
}
|