new: usr: add mineseeker game to the symfony 4 project #3
This commit is contained in:
70
src/Entity/Grid.php
Normal file
70
src/Entity/Grid.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user