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

368 lines
6.2 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;
use Jotunheimr\UserBundle\Entity\User;
/**
* 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 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 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 Grid $grid
*
* @return PlayedGame
*/
public function setGrid(Grid $grid = null)
{
$this->grid = $grid;
return $this;
}
/**
* Get grid
*
* @return Grid
*/
public function getGrid()
{
return $this->grid;
}
/**
* Set red
*
* @param User $red
*
* @return PlayedGame
*/
public function setRed(User $red = null)
{
$this->red = $red;
return $this;
}
/**
* Get red
*
* @return User
*/
public function getRed()
{
return $this->red;
}
/**
* Set blue
*
* @param User $blue
*
* @return PlayedGame
*/
public function setBlue(User $blue = null)
{
$this->blue = $blue;
return $this;
}
/**
* Get blue
*
* @return 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;
}
/**
* Set redAnon
*
* @param Gamer $redAnon
*
* @return PlayedGame
*/
public function setRedAnon(Gamer $redAnon = null)
{
$this->redAnon = $redAnon;
return $this;
}
/**
* Get redAnon
*
* @return Gamer
*/
public function getRedAnon()
{
return $this->redAnon;
}
/**
* Set blueAnon
*
* @param Gamer $blueAnon
*
* @return PlayedGame
*/
public function setBlueAnon(Gamer $blueAnon = null)
{
$this->blueAnon = $blueAnon;
return $this;
}
/**
* Get blueAnon
*
* @return Gamer
*/
public function getBlueAnon()
{
return $this->blueAnon;
}
}