new: usr: add mineseeker game to the symfony 4 project #3
This commit is contained in:
351
src/Entity/PlayedGame.php
Normal file
351
src/Entity/PlayedGame.php
Normal file
@@ -0,0 +1,351 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Application\Sonata\UserBundle\Entity\User;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass="App\Repository\PlayedGameRepository")
|
||||
*/
|
||||
class PlayedGame
|
||||
{
|
||||
/**
|
||||
* @ORM\Id()
|
||||
* @ORM\GeneratedValue()
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*
|
||||
* @ORM\Column(name="game_assoc", type="string", length=50, nullable=false)
|
||||
*/
|
||||
private $gameAssoc;
|
||||
|
||||
/**
|
||||
* @var Grid|null
|
||||
*
|
||||
* @ORM\OneToOne(targetEntity="App\Entity\Grid", mappedBy="playedGame", cascade={"persist"})
|
||||
*/
|
||||
private $grid;
|
||||
|
||||
/**
|
||||
* @var User|null
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="App\Application\Sonata\UserBundle\Entity\User")
|
||||
* @ORM\JoinColumn(name="red_id", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $red;
|
||||
|
||||
/**
|
||||
* @var Gamer|null
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Gamer")
|
||||
* @ORM\JoinColumn(name="red_anon", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $redAnon;
|
||||
|
||||
/**
|
||||
* @var User|null
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="App\Application\Sonata\UserBundle\Entity\User")
|
||||
* @ORM\JoinColumn(name="blue_id", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $blue;
|
||||
|
||||
/**
|
||||
* @var Gamer|null
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Gamer")
|
||||
* @ORM\JoinColumn(name="blue_anon", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $blueAnon;
|
||||
|
||||
/**
|
||||
* @var int|null
|
||||
*
|
||||
* @ORM\Column(name="red_points", type="integer", length=5, nullable=true)
|
||||
*/
|
||||
private $redPoints;
|
||||
|
||||
/**
|
||||
* @var int|null
|
||||
*
|
||||
* @ORM\Column(name="blue_points", type="integer", length=5, nullable=true)
|
||||
*/
|
||||
private $bluePoints;
|
||||
|
||||
/**
|
||||
* @var boolean|null
|
||||
*
|
||||
* @ORM\Column(name="red_exploded_bomb", type="boolean", nullable=true)
|
||||
*/
|
||||
private $redExplodedBomb;
|
||||
|
||||
/**
|
||||
* @var boolean|null
|
||||
*
|
||||
* @ORM\Column(name="blue_exploded_bomb", type="boolean", nullable=true)
|
||||
*/
|
||||
private $blueExplodedBomb;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*
|
||||
* @ORM\Column(name="resign", type="string", length=7, nullable=true)
|
||||
*/
|
||||
private $resign;
|
||||
|
||||
/**
|
||||
* @var \DateTime|null
|
||||
*
|
||||
* @ORM\Column(name="created", type="datetime", nullable=true)
|
||||
*/
|
||||
private $created;
|
||||
|
||||
/**
|
||||
* @var \DateTime|null
|
||||
*
|
||||
* @ORM\Column(name="updated", type="datetime", nullable=true)
|
||||
*/
|
||||
private $updated;
|
||||
|
||||
/**
|
||||
* @var Step|null
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Step", mappedBy="playedGame")
|
||||
* @ORM\JoinColumn(name="step", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $step;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getGameAssoc(): ?string
|
||||
{
|
||||
return $this->gameAssoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $gameAssoc
|
||||
*/
|
||||
public function setGameAssoc(?string $gameAssoc): void
|
||||
{
|
||||
$this->gameAssoc = $gameAssoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Grid|null
|
||||
*/
|
||||
public function getGrid()
|
||||
{
|
||||
return $this->grid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Grid|null $grid
|
||||
*/
|
||||
public function setGrid( $grid): void
|
||||
{
|
||||
$this->grid = $grid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return User|null
|
||||
*/
|
||||
public function getRed()
|
||||
{
|
||||
return $this->red;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User|null $red
|
||||
*/
|
||||
public function setRed( $red): void
|
||||
{
|
||||
$this->red = $red;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Gamer|null
|
||||
*/
|
||||
public function getRedAnon()
|
||||
{
|
||||
return $this->redAnon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Gamer|null $redAnon
|
||||
*/
|
||||
public function setRedAnon( $redAnon): void
|
||||
{
|
||||
$this->redAnon = $redAnon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return User|null
|
||||
*/
|
||||
public function getBlue()
|
||||
{
|
||||
return $this->blue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User|null $blue
|
||||
*/
|
||||
public function setBlue( $blue): void
|
||||
{
|
||||
$this->blue = $blue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Gamer|null
|
||||
*/
|
||||
public function getBlueAnon()
|
||||
{
|
||||
return $this->blueAnon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Gamer|null $blueAnon
|
||||
*/
|
||||
public function setBlueAnon( $blueAnon): void
|
||||
{
|
||||
$this->blueAnon = $blueAnon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getRedPoints(): ?int
|
||||
{
|
||||
return $this->redPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|null $redPoints
|
||||
*/
|
||||
public function setRedPoints(?int $redPoints): void
|
||||
{
|
||||
$this->redPoints = $redPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getBluePoints(): ?int
|
||||
{
|
||||
return $this->bluePoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|null $bluePoints
|
||||
*/
|
||||
public function setBluePoints(?int $bluePoints): void
|
||||
{
|
||||
$this->bluePoints = $bluePoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getRedExplodedBomb(): ?bool
|
||||
{
|
||||
return $this->redExplodedBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool|null $redExplodedBomb
|
||||
*/
|
||||
public function setRedExplodedBomb(?bool $redExplodedBomb): void
|
||||
{
|
||||
$this->redExplodedBomb = $redExplodedBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getBlueExplodedBomb(): ?bool
|
||||
{
|
||||
return $this->blueExplodedBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool|null $blueExplodedBomb
|
||||
*/
|
||||
public function setBlueExplodedBomb(?bool $blueExplodedBomb): void
|
||||
{
|
||||
$this->blueExplodedBomb = $blueExplodedBomb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getResign(): ?string
|
||||
{
|
||||
return $this->resign;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $resign
|
||||
*/
|
||||
public function setResign(?string $resign): void
|
||||
{
|
||||
$this->resign = $resign;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getCreated(): ?\DateTime
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime|null $created
|
||||
*/
|
||||
public function setCreated(?\DateTime $created): void
|
||||
{
|
||||
$this->created = $created;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getUpdated(): ?\DateTime
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime|null $updated
|
||||
*/
|
||||
public function setUpdated(?\DateTime $updated): void
|
||||
{
|
||||
$this->updated = $updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Step|null
|
||||
*/
|
||||
public function getStep()
|
||||
{
|
||||
return $this->step;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Step|null $step
|
||||
*/
|
||||
public function setStep( $step): void
|
||||
{
|
||||
$this->step = $step;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user