2019-10-25 14:59:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\VoteRepository")
|
|
|
|
*/
|
|
|
|
class Vote {
|
|
|
|
/**
|
|
|
|
* @ORM\Id()
|
|
|
|
* @ORM\GeneratedValue()
|
|
|
|
* @ORM\Column(type="integer")
|
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
|
|
*/
|
|
|
|
private $pseudo;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
|
|
*/
|
|
|
|
private $answerTxt;
|
|
|
|
/**
|
|
|
|
* @ORM\Column(type="datetime", nullable=true)
|
|
|
|
*/
|
|
|
|
private $answerDate;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Column(type="datetime")
|
|
|
|
*/
|
|
|
|
private $creationDate;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\Poll", inversedBy="votes")
|
|
|
|
* @ORM\JoinColumn(nullable=false)
|
|
|
|
*/
|
|
|
|
private $poll;
|
2019-11-06 14:35:07 +01:00
|
|
|
/**
|
|
|
|
* @ORM\ManyToOne(targetEntity="App\Entity\Choice", inversedBy="votes")
|
|
|
|
* @ORM\JoinColumn(nullable=false)
|
|
|
|
*/
|
|
|
|
private $choice;
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function getId(): ?int {
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this->id;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function getAnswerTxt(): ?string {
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this->answerTxt;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function setAnswerTxt( ?string $answerTxt ): self {
|
2019-11-06 14:35:07 +01:00
|
|
|
$this->answerTxt = $answerTxt;
|
2019-11-05 17:22:30 +01:00
|
|
|
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function getAnswerDate(): ?\DateTimeInterface {
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this->answerDate;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function setAnswerDate( ?\DateTimeInterface $answerDate ): self {
|
2019-11-06 14:35:07 +01:00
|
|
|
$this->answerDate = $answerDate;
|
2019-11-05 17:22:30 +01:00
|
|
|
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function getCreationDate(): ?\DateTimeInterface {
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this->creationDate;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function setCreationDate( \DateTimeInterface $creationDate ): self {
|
2019-11-06 14:35:07 +01:00
|
|
|
$this->creationDate = $creationDate;
|
2019-11-05 17:22:30 +01:00
|
|
|
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function getPoll(): ?Poll {
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this->poll;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
|
|
|
|
public function setPoll( ?Poll $poll ): self {
|
2019-11-06 14:35:07 +01:00
|
|
|
$this->poll = $poll;
|
2019-11-05 17:22:30 +01:00
|
|
|
|
2019-11-06 14:35:07 +01:00
|
|
|
return $this;
|
|
|
|
}
|
2019-11-05 17:22:30 +01:00
|
|
|
|
|
|
|
public function getPseudo(): ?string
|
|
|
|
{
|
|
|
|
return $this->pseudo;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setPseudo(?string $pseudo): self
|
|
|
|
{
|
|
|
|
$this->pseudo = $pseudo;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
2019-11-06 14:35:07 +01:00
|
|
|
|
|
|
|
public function getChoice(): ?Choice
|
|
|
|
{
|
|
|
|
return $this->choice;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setChoice(?Choice $choice): self
|
|
|
|
{
|
|
|
|
$this->choice = $choice;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
2019-10-25 14:59:20 +02:00
|
|
|
}
|