diff --git a/README.md b/README.md index 03e86ae..a9e2eae 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,27 @@ $ git clone https://gitlab.deblan.org/deblan/defis48.git $ composer install $ vim app/config/parameters.yml $ bin/console doctrine:schema:create -$ bin/console server:run +$ bin/console doctrine:generate:entities MmiEnigmaBundle +$ bin/console doctrine:schema:update --force ``` + +Mise à jour +=========== + +```bash +$ git pull origin master +$ composer update +$ bin/console doctrine:generate:entities MmiEnigmaBundle +$ bin/console doctrine:schema:update --force + +``` + +Exécution +========= + +Serveur de développement : + +``` +$ bin/console server:run & +``` diff --git a/src/Mmi/Bundle/EnigmaBundle/Entity/Awnser.php b/src/Mmi/Bundle/EnigmaBundle/Entity/Awnser.php index 8f3ef26..2e52034 100644 --- a/src/Mmi/Bundle/EnigmaBundle/Entity/Awnser.php +++ b/src/Mmi/Bundle/EnigmaBundle/Entity/Awnser.php @@ -31,9 +31,9 @@ class Awnser /** - * @var int + * @var DateTime * - * @ORM\Column(name="date", type="string", length=255) + * @ORM\Column(name="date", type="datetime") */ private $date; @@ -49,161 +49,110 @@ class Awnser */ private $enigma; -// /** -// * Get id -// * -// * @return int -// */ -// public function getId() -// { -// return $this->id; -// } -// -// /** -// * Set team -// * -// * @param string $team -// * -// * @return Awnser -// */ -// public function setTeam($team) -// { -// $this->team = $team; -// -// return $this; -// } -// -// /** -// * Get team -// * -// * @return string -// */ -// public function getTeam() -// { -// return $this->team; -// } -// -// /** -// * Set enigma -// * -// * @param string $enigma -// * -// * @return Awnser -// */ -// public function setEnigma($enigma) -// { -// $this->enigma = $enigma; -// -// return $this; -// } -// -// /** -// * Get enigma -// * -// * @return string -// */ -// public function getEnigma() -// { -// return $this->enigma; -// } -// -// /** -// * Set content -// * -// * @param string $content -// * -// * @return Awnser -// */ -// public function setContent($content) -// { -// $this->content = $content; -// -// return $this; -// } -// -// /** -// * Get content -// * -// * @return string -// */ -// public function getContent() -// { -// return $this->content; -// } -// -// -// /** -// * Set date -// * -// * @param int $date -// * -// * @return Enigma -// */ -// public function setDate($date) -// { -// $this->date = $date; -// -// return $this; -// } -// -// /** -// * Get date -// * -// * @return int -// */ -// public function getDate() -// { -// return $this->date; -// } -// -// -// /** -// * Set team_ID -// * -// * @param int $team_ID -// * -// * @return $this -// */ -// public function setTeam_ID($team_ID) -// { -// $this->team_ID = $team_ID; -// -// return $this; -// } -// -// /** -// * Get team_ID -// * -// * @return int -// */ -// public function getDate() -// { -// return $this->date; -// } -// -// -// /** -// * Set date -// * -// * @param int $date -// * -// * @return $this -// */ -// public function setDate($date) -// { -// $this->date = $date; -// -// return $this; -// } -// -// /** -// * Get date -// * -// * @return int -// */ -// public function getDate() -// { -// return $this->date; -// } -} + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set content + * + * @param string $content + * + * @return Awnser + */ + public function setContent($content) + { + $this->content = $content; + + return $this; + } + + /** + * Get content + * + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Set team + * + * @param \Mmi\Bundle\EnigmaBundle\Entity\Team $team + * + * @return Awnser + */ + public function setTeam(\Mmi\Bundle\EnigmaBundle\Entity\Team $team = null) + { + $this->team = $team; + + return $this; + } + + /** + * Get team + * + * @return \Mmi\Bundle\EnigmaBundle\Entity\Team + */ + public function getTeam() + { + return $this->team; + } + + /** + * Set enigma + * + * @param \Mmi\Bundle\EnigmaBundle\Entity\Enigma $enigma + * + * @return Awnser + */ + public function setEnigma(\Mmi\Bundle\EnigmaBundle\Entity\Enigma $enigma = null) + { + $this->enigma = $enigma; + + return $this; + } + + /** + * Get enigma + * + * @return \Mmi\Bundle\EnigmaBundle\Entity\Enigma + */ + public function getEnigma() + { + return $this->enigma; + } + + /** + * Set date + * + * @param \DateTime $date + * + * @return Awnser + */ + public function setDate($date) + { + $this->date = $date; + + return $this; + } + + /** + * Get date + * + * @return \DateTime + */ + public function getDate() + { + return $this->date; + } +} diff --git a/src/Mmi/Bundle/EnigmaBundle/Entity/Enigma.php b/src/Mmi/Bundle/EnigmaBundle/Entity/Enigma.php index b3a4396..48f119b 100644 --- a/src/Mmi/Bundle/EnigmaBundle/Entity/Enigma.php +++ b/src/Mmi/Bundle/EnigmaBundle/Entity/Enigma.php @@ -94,4 +94,3 @@ class Enigma return $this->content; } } - diff --git a/src/Mmi/Bundle/EnigmaBundle/Entity/Team.php b/src/Mmi/Bundle/EnigmaBundle/Entity/Team.php index ca2ae57..e2d0d0a 100644 --- a/src/Mmi/Bundle/EnigmaBundle/Entity/Team.php +++ b/src/Mmi/Bundle/EnigmaBundle/Entity/Team.php @@ -94,4 +94,3 @@ class Team return $this->password; } } - diff --git a/src/Mmi/Bundle/EnigmaBundle/Entity/Timer.php b/src/Mmi/Bundle/EnigmaBundle/Entity/Timer.php index ce79ccf..5a86b78 100644 --- a/src/Mmi/Bundle/EnigmaBundle/Entity/Timer.php +++ b/src/Mmi/Bundle/EnigmaBundle/Entity/Timer.php @@ -22,23 +22,21 @@ class Timer private $id; /** - * @var \DateTime + * @var DateTime * * @ORM\Column(name="date", type="datetime") */ private $date; /** - * @var int - * - * @ORM\Column(name="team", type="integer") + * @ORM\ManyToOne(targetEntity="Team", inversedBy="Awnser") + * @ORM\JoinColumn(name="team_id", referencedColumnName="id") */ private $team; /** - * @var string - * - * @ORM\Column(name="enigma", type="string", length=255) + * @ORM\ManyToOne(targetEntity="Enigma", inversedBy="Awnser") + * @ORM\JoinColumn(name="enigma_id", referencedColumnName="id") */ private $enigma; @@ -125,4 +123,3 @@ class Timer return $this->enigma; } } -