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

495 lines
8.3 KiB
PHP
Raw Normal View History

2016-10-21 23:30:41 +02:00
<?php
namespace Mine\SeekerBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
2016-10-25 11:19:50 +02:00
use Doctrine\Common\Collections\Collection;
2016-10-21 23:30:41 +02:00
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;
2016-10-25 11:19:50 +02:00
/**
* @var string
*
* @ORM\Column(name="game_assoc", type="string", length=50, nullable=false)
*/
private $gameAssoc;
2016-10-21 23:30:41 +02:00
/**
* @var Grid
*
2016-10-25 11:19:50 +02:00
* @ORM\OneToOne(targetEntity="Mine\SeekerBundle\Entity\Grid", mappedBy="playedGame", cascade={"persist"})
2016-10-21 23:30:41 +02:00
*/
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_exploded_bomb", type="boolean", nullable=true)
2016-10-21 23:30:41 +02:00
*/
private $redExplodedBomb;
2016-10-21 23:30:41 +02:00
/**
* @var boolean
*
* @ORM\Column(name="blue_exploded_bomb", type="boolean", nullable=true)
2016-10-21 23:30:41 +02:00
*/
private $blueExplodedBomb;
/**
* @var string
*
* @ORM\Column(name="resign", type="string", length=7, nullable=true)
*/
private $resign;
2016-10-21 23:30:41 +02:00
/**
* @var \DateTime
*
* @ORM\Column(name="created", type="datetime", nullable=true)
*/
private $created;
/**
* @var \DateTime
*
* @ORM\Column(name="updated", type="datetime", nullable=true)
*/
private $updated;
2016-10-21 23:30:41 +02:00
/**
* @var Step
*
* @ORM\OneToMany(targetEntity="Mine\SeekerBundle\Entity\Step", mappedBy="playedGame")
2016-10-25 11:19:50 +02:00
* @ORM\JoinColumn(name="step", referencedColumnName="id", nullable=true)
2016-10-21 23:30:41 +02:00
*/
private $step;
/**
2016-10-25 11:19:50 +02:00
* Constructor
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
public function __construct()
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
$this->step = new ArrayCollection();
2016-10-21 23:30:41 +02:00
}
2016-10-25 11:19:50 +02:00
2016-10-21 23:30:41 +02:00
/**
2016-10-25 11:19:50 +02:00
* Get id
*
* @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
}
/**
* Set gameAssoc
*
* @param string $gameAssoc
*
* @return PlayedGame
*/
public function setGameAssoc($gameAssoc)
{
$this->gameAssoc = $gameAssoc;
return $this;
}
/**
* Get gameAssoc
*
* @return string
*/
public function getGameAssoc()
{
return $this->gameAssoc;
}
2016-10-21 23:30:41 +02:00
/**
* 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 redExplodedBomb
2016-10-21 23:30:41 +02:00
*
* @param string $redExplodedBomb
2016-10-21 23:30:41 +02:00
*
* @return PlayedGame
*/
public function setRedExplodedBomb($redExplodedBomb)
2016-10-21 23:30:41 +02:00
{
$this->redExplodedBomb = $redExplodedBomb;
2016-10-21 23:30:41 +02:00
return $this;
}
/**
* Get redExplodedBomb
2016-10-21 23:30:41 +02:00
*
* @return string
*/
public function getRedExplodedBomb()
2016-10-21 23:30:41 +02:00
{
return $this->redExplodedBomb;
2016-10-21 23:30:41 +02:00
}
/**
* Set blueExplodedBomb
2016-10-21 23:30:41 +02:00
*
* @param string $blueExplodedBomb
2016-10-21 23:30:41 +02:00
*
* @return PlayedGame
*/
public function setBlueExplodedBomb($blueExplodedBomb)
2016-10-21 23:30:41 +02:00
{
$this->blueExplodedBomb = $blueExplodedBomb;
2016-10-21 23:30:41 +02:00
return $this;
}
/**
* Get blueExplodedBomb
2016-10-21 23:30:41 +02:00
*
* @return string
*/
public function getBlueExplodedBomb()
2016-10-21 23:30:41 +02:00
{
return $this->blueExplodedBomb;
2016-10-21 23:30:41 +02:00
}
/**
* 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;
}
2016-10-25 11:19:50 +02:00
/**
* 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;
}
2016-10-21 23:30:41 +02:00
/**
* 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;
}
/**
2016-10-25 11:19:50 +02:00
* Set blueAnon
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @param Gamer $blueAnon
2016-10-21 23:30:41 +02:00
*
* @return PlayedGame
*/
2016-10-25 11:19:50 +02:00
public function setBlueAnon(Gamer $blueAnon = null)
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
$this->blueAnon = $blueAnon;
2016-10-21 23:30:41 +02:00
return $this;
}
/**
2016-10-25 11:19:50 +02:00
* Get blueAnon
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @return Gamer
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
public function getBlueAnon()
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
return $this->blueAnon;
2016-10-21 23:30:41 +02:00
}
/**
2016-10-25 11:19:50 +02:00
* Add step
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @param Step $step
*
* @return PlayedGame
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
public function addStep(Step $step)
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
$this->step[] = $step;
return $this;
2016-10-21 23:30:41 +02:00
}
/**
2016-10-25 11:19:50 +02:00
* Remove step
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @param Step $step
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
public function removeStep(Step $step)
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
$this->step->removeElement($step);
2016-10-21 23:30:41 +02:00
}
/**
2016-10-25 11:19:50 +02:00
* Get step
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @return Collection
2016-10-21 23:30:41 +02:00
*/
2016-10-25 11:19:50 +02:00
public function getStep()
2016-10-21 23:30:41 +02:00
{
2016-10-25 11:19:50 +02:00
return $this->step;
2016-10-21 23:30:41 +02:00
}
/**
* Set resign
2016-10-21 23:30:41 +02:00
*
* @param string $resign
2016-10-21 23:30:41 +02:00
*
* @return PlayedGame
*/
public function setResign($resign)
2016-10-21 23:30:41 +02:00
{
$this->resign = $resign;
2016-10-21 23:30:41 +02:00
return $this;
}
/**
* Get resign
2016-10-21 23:30:41 +02:00
*
2016-10-25 11:19:50 +02:00
* @return string
2016-10-21 23:30:41 +02:00
*/
public function getResign()
2016-10-21 23:30:41 +02:00
{
return $this->resign;
2016-10-21 23:30:41 +02:00
}
/**
* Set created
*
* @param \DateTime $created
*
* @return PlayedGame
*/
public function setCreated($created)
{
$this->created = $created;
return $this;
}
/**
* Get created
*
* @return \DateTime
*/
public function getCreated()
{
return $this->created;
}
/**
* Set updated
*
* @param \DateTime $updated
*
* @return PlayedGame
*/
public function setUpdated($updated)
{
$this->updated = $updated;
return $this;
}
/**
* Get updated
*
* @return \DateTime
*/
public function getUpdated()
{
return $this->updated;
}
2016-10-21 23:30:41 +02:00
}