<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Answer
*
* @ORM\Table(name="answer")
* @ORM\Entity(repositoryClass="App\Repository\AnswerRepository")
*/
class Answer
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var int
*
* @ORM\ManyToOne(targetEntity="Result", inversedBy="answers")
*/
private $result;
/**
* @var int
*
* @ORM\ManyToOne(targetEntity="Question", inversedBy="answers")
* @ORM\JoinColumn(name="question_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $question;
/**
* @var string
*
* @ORM\Column(name="value", type="string", length=255)
*/
private $value;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set result
*
* @param \App\Entity\Result $result
*
* @return Answer
*/
public function setResult(\App\Entity\Result $result)
{
$this->result = $result;
return $this;
}
/**
* Get result
*
* @return int
*/
public function getResult()
{
return $this->result;
}
/**
* Set question
*
* @param \App\Entity\Question $question
*
* @return Answer
*/
public function setQuestion(\App\Entity\Question $question)
{
$this->question = $question;
return $this;
}
/**
* Get question
*
* @return int
*/
public function getQuestion()
{
return $this->question;
}
/**
* Set value
*
* @param string $value
*
* @return Answer
*/
public function setValue($value)
{
$this->value = $value;
return $this;
}
/**
* Get value
*
* @return string
*/
public function getValue()
{
return $this->value;
}
}