date-poll-api/src/Entity/Vote.php

87 lines
1.5 KiB
PHP

<?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;
public function getId(): ?int {
return $this->id;
}
public function getAnswerTxt(): ?string {
return $this->answerTxt;
}
public function setAnswerTxt( ?string $answerTxt ): self {
$this->answerTxt = $answerTxt;
return $this;
}
public function getAnswerDate(): ?\DateTimeInterface {
return $this->answerDate;
}
public function setAnswerDate( ?\DateTimeInterface $answerDate ): self {
$this->answerDate = $answerDate;
return $this;
}
public function getCreationDate(): ?\DateTimeInterface {
return $this->creationDate;
}
public function setCreationDate( \DateTimeInterface $creationDate ): self {
$this->creationDate = $creationDate;
return $this;
}
public function getPoll(): ?Poll {
return $this->poll;
}
public function setPoll( ?Poll $poll ): self {
$this->poll = $poll;
return $this;
}
}