defis
This commit is contained in:
parent
188600a044
commit
9d8c6cb979
|
@ -29,21 +29,18 @@ class ChallengePeer
|
|||
{
|
||||
$data = [];
|
||||
|
||||
for ($i = 18; $i < 25; $i++) {
|
||||
$data[] = (new Challenge())
|
||||
->setTitle('Mon titre '.$i)
|
||||
->setDescription('Ma description '.$i)
|
||||
->setDay(1)
|
||||
->setHour($i);
|
||||
}
|
||||
$data[] = (new Challenge())
|
||||
->setTitle('Défi Facebook')
|
||||
->setDescription('Le BDE offre les pizzas à L\'équipe qui a un maximum de j\'aimes sur Facebook d\'ici le prochain défi, tous les cousp sont permis.')
|
||||
->setDay(1)
|
||||
->setHour(18);
|
||||
|
||||
$data[] = (new Challenge())
|
||||
->setTitle('')
|
||||
->setDescription('')
|
||||
->setDay(1)
|
||||
->setHour(18);
|
||||
|
||||
for ($i = 1; $i < 19; $i++) {
|
||||
$data[] = (new Challenge())
|
||||
->setTitle('Mon titre '.$i)
|
||||
->setDescription('Ma description '.$i)
|
||||
->setDay(2)
|
||||
->setHour($i);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
158
src/Mmi/Bundle/EnigmaBundle/Entity/Awnser.php~
Normal file
158
src/Mmi/Bundle/EnigmaBundle/Entity/Awnser.php~
Normal file
|
@ -0,0 +1,158 @@
|
|||
<?php
|
||||
|
||||
namespace Mmi\Bundle\EnigmaBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Awnser
|
||||
*
|
||||
* @ORM\Table(name="awnser")
|
||||
* @ORM\Entity(repositoryClass="Mmi\Bundle\EnigmaBundle\Repository\AwnserRepository")
|
||||
*/
|
||||
class Awnser
|
||||
{
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="content", type="string", length=255)
|
||||
*/
|
||||
private $content;
|
||||
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
*
|
||||
* @ORM\Column(name="date", type="datetime")
|
||||
*/
|
||||
private $date;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Team", inversedBy="Awnser")
|
||||
* @ORM\JoinColumn(name="team_id", referencedColumnName="id")
|
||||
*/
|
||||
private $team;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Enigma", inversedBy="Awnser")
|
||||
* @ORM\JoinColumn(name="enigma_id", referencedColumnName="id")
|
||||
*/
|
||||
private $enigma;
|
||||
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
127
src/Mmi/Bundle/EnigmaBundle/Entity/Enigma.php~
Normal file
127
src/Mmi/Bundle/EnigmaBundle/Entity/Enigma.php~
Normal file
|
@ -0,0 +1,127 @@
|
|||
<?php
|
||||
|
||||
namespace Mmi\Bundle\EnigmaBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Enigma
|
||||
*
|
||||
* @ORM\Table(name="enigma")
|
||||
* @ORM\Entity(repositoryClass="Mmi\Bundle\EnigmaBundle\Repository\EnigmaRepository")
|
||||
*/
|
||||
class Enigma
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="title", type="string", length=255)
|
||||
*/
|
||||
private $title;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="content", type="string", length=255)
|
||||
*/
|
||||
private $content;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="hash", type="string", length=32)
|
||||
*/
|
||||
private $hash;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set title
|
||||
*
|
||||
* @param string $title
|
||||
*
|
||||
* @return Enigma
|
||||
*/
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get title
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set content
|
||||
*
|
||||
* @param string $content
|
||||
*
|
||||
* @return Enigma
|
||||
*/
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->content = $content;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set hash
|
||||
*
|
||||
* @param string $hash
|
||||
*
|
||||
* @return Enigma
|
||||
*/
|
||||
public function setHash($hash)
|
||||
{
|
||||
$this->hash = $hash;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get hash
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHash()
|
||||
{
|
||||
return $this->hash;
|
||||
}
|
||||
}
|
96
src/Mmi/Bundle/EnigmaBundle/Entity/Team.php~
Normal file
96
src/Mmi/Bundle/EnigmaBundle/Entity/Team.php~
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
|
||||
namespace Mmi\Bundle\EnigmaBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Team
|
||||
*
|
||||
* @ORM\Table(name="team")
|
||||
* @ORM\Entity(repositoryClass="Mmi\Bundle\EnigmaBundle\Repository\TeamRepository")
|
||||
*/
|
||||
class Team
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="username", type="string", length=255, unique=true)
|
||||
*/
|
||||
private $username;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="password", type="string", length=255)
|
||||
*/
|
||||
private $password;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set username
|
||||
*
|
||||
* @param string $username
|
||||
*
|
||||
* @return Team
|
||||
*/
|
||||
public function setUsername($username)
|
||||
{
|
||||
$this->username = $username;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get username
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUsername()
|
||||
{
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set password
|
||||
*
|
||||
* @param string $password
|
||||
*
|
||||
* @return Team
|
||||
*/
|
||||
public function setPassword($password)
|
||||
{
|
||||
$this->password = $password;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
}
|
125
src/Mmi/Bundle/EnigmaBundle/Entity/Timer.php~
Normal file
125
src/Mmi/Bundle/EnigmaBundle/Entity/Timer.php~
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
|
||||
namespace Mmi\Bundle\EnigmaBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Timer
|
||||
*
|
||||
* @ORM\Table(name="timer")
|
||||
* @ORM\Entity(repositoryClass="Mmi\Bundle\EnigmaBundle\Repository\TimerRepository")
|
||||
*/
|
||||
class Timer
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
*
|
||||
* @ORM\Column(name="date", type="datetime")
|
||||
*/
|
||||
private $date;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Team", inversedBy="Awnser")
|
||||
* @ORM\JoinColumn(name="team_id", referencedColumnName="id")
|
||||
*/
|
||||
private $team;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Enigma", inversedBy="Awnser")
|
||||
* @ORM\JoinColumn(name="enigma_id", referencedColumnName="id")
|
||||
*/
|
||||
private $enigma;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set date
|
||||
*
|
||||
* @param \DateTime $date
|
||||
*
|
||||
* @return Timer
|
||||
*/
|
||||
public function setDate($date)
|
||||
{
|
||||
$this->date = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set team
|
||||
*
|
||||
* @param integer $team
|
||||
*
|
||||
* @return Timer
|
||||
*/
|
||||
public function setTeam($team)
|
||||
{
|
||||
$this->team = $team;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get team
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getTeam()
|
||||
{
|
||||
return $this->team;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set enigma
|
||||
*
|
||||
* @param string $enigma
|
||||
*
|
||||
* @return Timer
|
||||
*/
|
||||
public function setEnigma($enigma)
|
||||
{
|
||||
$this->enigma = $enigma;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enigma
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEnigma()
|
||||
{
|
||||
return $this->enigma;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue