create entities and repositories
This commit is contained in:
318
src/Mine/SeekerBundle/Entity/PlayedGame.php~
Normal file
318
src/Mine/SeekerBundle/Entity/PlayedGame.php~
Normal file
@@ -0,0 +1,318 @@
|
||||
<?php
|
||||
|
||||
namespace Mine\SeekerBundle\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* PlayedGame
|
||||
*
|
||||
* @ORM\Table(name="played_game")
|
||||
* @ORM\Entity(repositoryClass="Mine\SeekerBundle\Repository\PlayedGameRepository")
|
||||
*/
|
||||
class PlayedGame
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var Grid
|
||||
*
|
||||
* @ORM\OneToOne(targetEntity="Mine\SeekerBundle\Entity\Grid", mappedBy="playedGame")
|
||||
*/
|
||||
private $grid;
|
||||
|
||||
/**
|
||||
* @var \Jotunheimr\UserBundle\Entity\User
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Jotunheimr\UserBundle\Entity\User")
|
||||
* @ORM\JoinColumn(name="red_id", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $red;
|
||||
|
||||
/**
|
||||
* @var Gamer
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Mine\SeekerBundle\Entity\Gamer")
|
||||
* @ORM\JoinColumn(name="red_anon", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $redAnon;
|
||||
|
||||
/**
|
||||
* @var \Jotunheimr\UserBundle\Entity\User
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Jotunheimr\UserBundle\Entity\User")
|
||||
* @ORM\JoinColumn(name="blue_id", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $blue;
|
||||
|
||||
/**
|
||||
* @var Gamer
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Mine\SeekerBundle\Entity\Gamer")
|
||||
* @ORM\JoinColumn(name="blue_anon", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $blueAnon;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="red_points", type="integer", length=5, nullable=true)
|
||||
*/
|
||||
private $redPoints;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="blue_points", type="integer", length=5, nullable=true)
|
||||
*/
|
||||
private $bluePoints;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="red_has_bomb", nullable=true)
|
||||
*/
|
||||
private $redHasBomb;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="blue_has_bomb", nullable=true)
|
||||
*/
|
||||
private $blueHasBomb;
|
||||
|
||||
/**
|
||||
* @var Step
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Mine\SeekerBundle\Entity\Step", mappedBy="playedGame")
|
||||
*/
|
||||
private $step;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->step = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set redPoints
|
||||
*
|
||||
* @param integer $redPoints
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setRedPoints($redPoints)
|
||||
{
|
||||
$this->redPoints = $redPoints;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get redPoints
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getRedPoints()
|
||||
{
|
||||
return $this->redPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set bluePoints
|
||||
*
|
||||
* @param integer $bluePoints
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setBluePoints($bluePoints)
|
||||
{
|
||||
$this->bluePoints = $bluePoints;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bluePoints
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getBluePoints()
|
||||
{
|
||||
return $this->bluePoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set redHasBomb
|
||||
*
|
||||
* @param string $redHasBomb
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setRedHasBomb($redHasBomb)
|
||||
{
|
||||
$this->redHasBomb = $redHasBomb;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get redHasBomb
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRedHasBomb()
|
||||
{
|
||||
return $this->redHasBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set blueHasBomb
|
||||
*
|
||||
* @param string $blueHasBomb
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setBlueHasBomb($blueHasBomb)
|
||||
{
|
||||
$this->blueHasBomb = $blueHasBomb;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get blueHasBomb
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlueHasBomb()
|
||||
{
|
||||
return $this->blueHasBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set grid
|
||||
*
|
||||
* @param \Mine\SeekerBundle\Entity\Grid $grid
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setGrid(\Mine\SeekerBundle\Entity\Grid $grid = null)
|
||||
{
|
||||
$this->grid = $grid;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get grid
|
||||
*
|
||||
* @return \Mine\SeekerBundle\Entity\Grid
|
||||
*/
|
||||
public function getGrid()
|
||||
{
|
||||
return $this->grid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set red
|
||||
*
|
||||
* @param \Jotunheimr\UserBundle\Entity\User $red
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setRed(\Jotunheimr\UserBundle\Entity\User $red = null)
|
||||
{
|
||||
$this->red = $red;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get red
|
||||
*
|
||||
* @return \Jotunheimr\UserBundle\Entity\User
|
||||
*/
|
||||
public function getRed()
|
||||
{
|
||||
return $this->red;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set blue
|
||||
*
|
||||
* @param \Jotunheimr\UserBundle\Entity\User $blue
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setBlue(\Jotunheimr\UserBundle\Entity\User $blue = null)
|
||||
{
|
||||
$this->blue = $blue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get blue
|
||||
*
|
||||
* @return \Jotunheimr\UserBundle\Entity\User
|
||||
*/
|
||||
public function getBlue()
|
||||
{
|
||||
return $this->blue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add step
|
||||
*
|
||||
* @param \Mine\SeekerBundle\Entity\Step $step
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function addStep(\Mine\SeekerBundle\Entity\Step $step)
|
||||
{
|
||||
$this->step[] = $step;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove step
|
||||
*
|
||||
* @param \Mine\SeekerBundle\Entity\Step $step
|
||||
*/
|
||||
public function removeStep(\Mine\SeekerBundle\Entity\Step $step)
|
||||
{
|
||||
$this->step->removeElement($step);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get step
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getStep()
|
||||
{
|
||||
return $this->step;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user