src/Entity/Survey/SurveyResultData.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Survey;
  3. use App\Entity\PrimaryIdTrait;
  4. use App\Repository\Survey\SurveyResultDataRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Timestampable\Traits\TimestampableEntity;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. #[ORM\Entity(repositoryClassSurveyResultDataRepository::class)]
  11. class SurveyResultData
  12. {
  13.     use PrimaryIdTrait;
  14.     use TimestampableEntity;
  15.     /**
  16.      * @var SurveyResult
  17.      */
  18.     #[ORM\ManyToOne(targetEntity'App\Entity\Survey\SurveyResult'inversedBy'surveyResultData')]
  19.     private $surveyResult;
  20.     /**
  21.      * @var Question
  22.      */
  23.     #[ORM\ManyToOne(targetEntity'App\Entity\Survey\Question'inversedBy'surveyResultData')]
  24.     #[Groups(['test'])]
  25.     private $question;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     #[Groups(['test'])]
  28.     private ?string $data;
  29.     #[ORM\Column(type'boolean'nullabletrue)]
  30.     #[Groups(['test'])]
  31.     private ?bool $isPasted;
  32.     /**
  33.      * @return SurveyResult
  34.      */
  35.     public function getSurveyResult(): ?SurveyResult
  36.     {
  37.         return $this->surveyResult;
  38.     }
  39.     /**
  40.      * @param SurveyResult $answer
  41.      */
  42.     public function setSurveyResult(SurveyResult $surveyResult): void
  43.     {
  44.         $this->surveyResult $surveyResult;
  45.     }
  46.     /**
  47.      * @return Question
  48.      */
  49.     public function getQuestion(): ?Question
  50.     {
  51.         return $this->question;
  52.     }
  53.     /**
  54.      * @param Question $question
  55.      */
  56.     public function setQuestion(Question $question): void
  57.     {
  58.         $this->question $question;
  59.     }
  60.     public function getData(): ?string
  61.     {
  62.         return $this->data;
  63.     }
  64.     public function setData(?string $data): void
  65.     {
  66.         $this->data $data;
  67.     }
  68.     public function getIsPasted(): ?bool
  69.     {
  70.         return $this->isPasted;
  71.     }
  72.     public function setIsPasted(?bool $isPasted): void
  73.     {
  74.         $this->isPasted $isPasted;
  75.     }
  76. }