<?php
namespace App\Entity\Survey;
use App\Entity\PrimaryIdTrait;
use App\Repository\Survey\SurveyResultDataRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: SurveyResultDataRepository::class)]
class SurveyResultData
{
use PrimaryIdTrait;
use TimestampableEntity;
/**
* @var SurveyResult
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Survey\SurveyResult', inversedBy: 'surveyResultData')]
private $surveyResult;
/**
* @var Question
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Survey\Question', inversedBy: 'surveyResultData')]
#[Groups(['test'])]
private $question;
#[ORM\Column(type: 'text', nullable: true)]
#[Groups(['test'])]
private ?string $data;
#[ORM\Column(type: 'boolean', nullable: true)]
#[Groups(['test'])]
private ?bool $isPasted;
/**
* @return SurveyResult
*/
public function getSurveyResult(): ?SurveyResult
{
return $this->surveyResult;
}
/**
* @param SurveyResult $answer
*/
public function setSurveyResult(SurveyResult $surveyResult): void
{
$this->surveyResult = $surveyResult;
}
/**
* @return Question
*/
public function getQuestion(): ?Question
{
return $this->question;
}
/**
* @param Question $question
*/
public function setQuestion(Question $question): void
{
$this->question = $question;
}
public function getData(): ?string
{
return $this->data;
}
public function setData(?string $data): void
{
$this->data = $data;
}
public function getIsPasted(): ?bool
{
return $this->isPasted;
}
public function setIsPasted(?bool $isPasted): void
{
$this->isPasted = $isPasted;
}
}