src/Entity/Survey/SurveyNotification.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Survey;
  3. use App\Entity\PrimaryIdTrait;
  4. use App\Entity\User\User;
  5. use App\Repository\Survey\SurveyResultRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Timestampable\Traits\TimestampableEntity;
  10. use Symfony\Component\Serializer\Annotation\Groups;
  11. #[ORM\Entity(repositoryClassSurveyNotificationRepository::class)]
  12. class SurveyNotification
  13. {
  14.     use PrimaryIdTrait;
  15.     use TimestampableEntity;
  16.     /**
  17.      * @var Survey
  18.      */
  19.     #[ORM\ManyToOne(targetEntity'App\Entity\Survey\Survey'inversedBy'surveyNotification')]
  20.     private $survey;
  21.     /**
  22.      * @var User
  23.      */
  24.     #[ORM\ManyToOne(targetEntity'App\Entity\User\User'inversedBy'surveyNotification')]
  25.     private $user;
  26.     /**
  27.      * @return Survey
  28.      */
  29.     public function getSurvey(): ?Survey
  30.     {
  31.         return $this->survey;
  32.     }
  33.     /**
  34.      * @param Survey $survey
  35.      */
  36.     public function setSurvey(Survey $survey): void
  37.     {
  38.         $this->survey $survey;
  39.     }
  40.     /**
  41.      * @return User
  42.      */
  43.     public function getUser(): ?User
  44.     {
  45.         return $this->user;
  46.     }
  47.     /**
  48.      * @param User $survey
  49.      */
  50.     public function setUser(User $user): void
  51.     {
  52.         $this->user $user;
  53.     }
  54. }