for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Entity\Survey;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
use Symfony\Component\Validator\Constraints as Assert;
/**
* SurveyAnswer.
*
* @ORM\Entity(repositoryClass="AppBundle\Repository\SurveyAnswerRepository")
*/
class SurveyAnswer
{
use ORMBehaviors\Timestampable\Timestampable;
* @var int
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
private $id;
* @var SurveyQuestion
* @Assert\Type("object")
* @Assert\Valid
* @ORM\ManyToOne(targetEntity="SurveyQuestion", inversedBy="answers")
* @ORM\JoinColumn(onDelete="CASCADE")
private $question;
* @var Survey
* @ORM\ManyToOne(targetEntity="Survey", inversedBy="answers")
private $survey;
* @var string
* @Assert\NotBlank()
* @Assert\Type("string")
* @Assert\Length(
* max = 1000
* )
* @ORM\Column(name="body", type="text")
private $content;
* Get id.
* @return int
public function getId()
return $this->id;
}
* Set survey question.
* @param SurveyQuestion $question
* @return SurveyAnswer
public function setQuestion(SurveyQuestion $question)
$this->question = $question;
return $this;
* Get survey question.
* @return SurveyQuestion
public function getQuestion()
return $this->question;
* Set survey.
* @param Survey $survey
public function setSurvey(Survey $survey)
$this->survey = $survey;
* Get survey.
* @return Survey
public function getSurvey()
return $this->survey;
* Set content.
* @param string $content
public function setContent($content)
$this->content = $content;
* Get content.
* @return string
public function getContent()
return $this->content;