src/Entity/EvaluationAnswer.php line 10
<?php
namespace App\Entity;
use App\Repository\EvaluationAnswerRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EvaluationAnswerRepository::class)]
class EvaluationAnswer
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column]
private ?int $choice = null;
#[ORM\ManyToOne(inversedBy: 'evaluationAnswers')]
#[ORM\JoinColumn(nullable: false)]
private ?Evaluation $evaluation = null;
#[ORM\ManyToOne(inversedBy: 'evaluationAnswers')]
#[ORM\JoinColumn(nullable: false)]
private ?Question $question = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $comment = null;
public function __construct($question, $evaluation, $choice, $comment)
{
$this->question = $question;
$this->choice = intval($choice);
$this->evaluation = $evaluation;
$this->comment = $comment;
}
public function getId(): ?int
{
return $this->id;
}
public function getChoice(): ?int
{
return $this->choice;
}
public function setChoice(int $choice): self
{
$this->choice = $choice;
return $this;
}
public function getEvaluation(): ?Evaluation
{
return $this->evaluation;
}
public function setEvaluation(?Evaluation $evaluation): self
{
$this->evaluation = $evaluation;
return $this;
}
public function getQuestion(): ?Question
{
return $this->question;
}
public function setQuestion(?Question $question): self
{
$this->question = $question;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
}