Private
Public Access
1
0
Files
MineSeeker/src/Mine/SeekerBundle/Entity/Grid.php

82 lines
1.5 KiB
PHP
Raw Normal View History

2016-10-21 23:30:41 +02:00
<?php
namespace Mine\SeekerBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Grid
*
* @ORM\Table(name="grid")
* @ORM\Entity(repositoryClass="Mine\SeekerBundle\Repository\GridRepository")
*/
class Grid
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var PlayedGame
*
2016-10-25 11:19:50 +02:00
* @ORM\OneToOne(targetEntity="Mine\SeekerBundle\Entity\PlayedGame", inversedBy="grid", cascade={"persist"})
2016-10-21 23:30:41 +02:00
*/
private $playedGame;
/**
2016-11-14 20:02:54 +01:00
* @var GridRow
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @ORM\OneToMany(targetEntity="Mine\SeekerBundle\Entity\GridRow", mappedBy="grid", cascade={"persist"})
* @ORM\JoinColumn(name="grid_row", referencedColumnName="id", onDelete="CASCADE")
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
private $gridRow;
2016-10-21 23:30:41 +02:00
/**
* Constructor
*/
public function __construct()
{
2016-10-25 11:19:50 +02:00
$this->gridRow = new ArrayCollection();
2016-10-21 23:30:41 +02:00
}
/**
2016-10-25 11:19:50 +02:00
* Get id
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @return integer
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
public function getId()
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
return $this->id;
2016-10-21 23:30:41 +02:00
}
/**
2016-10-25 11:19:50 +02:00
* Set playedGame
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @param PlayedGame $playedGame
2016-10-21 23:30:41 +02:00
*
* @return Grid
*/
2016-10-25 11:19:50 +02:00
public function setPlayedGame(PlayedGame $playedGame = null)
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
$this->playedGame = $playedGame;
2016-10-21 23:30:41 +02:00
return $this;
}
/**
2016-10-25 11:19:50 +02:00
* Get playedGame
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @return PlayedGame
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
public function getPlayedGame()
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
return $this->playedGame;
2016-10-21 23:30:41 +02:00
}
}