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