1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00
date-poll-api/src/Entity/Vote.php

116 lines
2.3 KiB
PHP
Raw Normal View History

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;
/**
* @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 {
return $this->id;
}
2019-10-25 14:59:20 +02:00
public function getAnswerTxt(): ?string {
return $this->answerTxt;
}
2019-10-25 14:59:20 +02:00
public function setAnswerTxt( ?string $answerTxt ): self {
$this->answerTxt = $answerTxt;
2019-11-05 17:22:30 +01:00
return $this;
}
2019-10-25 14:59:20 +02:00
public function getAnswerDate(): ?\DateTimeInterface {
return $this->answerDate;
}
2019-10-25 14:59:20 +02:00
public function setAnswerDate( ?\DateTimeInterface $answerDate ): self {
$this->answerDate = $answerDate;
2019-11-05 17:22:30 +01:00
return $this;
}
2019-10-25 14:59:20 +02:00
public function getCreationDate(): ?\DateTimeInterface {
return $this->creationDate;
}
2019-10-25 14:59:20 +02:00
public function setCreationDate( \DateTimeInterface $creationDate ): self {
$this->creationDate = $creationDate;
2019-11-05 17:22:30 +01:00
return $this;
}
2019-10-25 14:59:20 +02:00
public function getPoll(): ?Poll {
return $this->poll;
}
2019-10-25 14:59:20 +02:00
public function setPoll( ?Poll $poll ): self {
$this->poll = $poll;
2019-11-05 17:22:30 +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;
}
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
}