src/Entity/Survey.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'survey')]
  5. #[ORM\Entity(repositoryClass'App\Entity\Repository\SurveyRepository')]
  6. class Survey
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\Column(type'integer')]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     private $id;
  12.     #[ORM\Column(type'string'nullabletrue)]
  13.     private $survey_user;
  14.     #[ORM\Column(type'string'nullabletrue)]
  15.     private $survey_url;
  16.     #[ORM\Column(type'string'nullabletrue)]
  17.     private $type;
  18.     #[ORM\ManyToOne(targetEntity'App\Entity\User'inversedBy'survey')]
  19.     #[ORM\JoinColumn(name'user_id'referencedColumnName'id')]
  20.     private $user;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getSurveyUser(): ?string
  26.     {
  27.         return $this->survey_user;
  28.     }
  29.     public function setSurveyUser(?string $survey_user): self
  30.     {
  31.         $this->survey_user $survey_user;
  32.         return $this;
  33.     }
  34.     public function getSurveyUrl(): ?string
  35.     {
  36.         return $this->survey_url;
  37.     }
  38.     public function setSurveyUrl(?string $survey_url): self
  39.     {
  40.         $this->survey_url $survey_url;
  41.         return $this;
  42.     }
  43.     public function getUser(): ?User
  44.     {
  45.         return $this->user;
  46.     }
  47.     public function setUser(?User $user): self
  48.     {
  49.         $this->user $user;
  50.         return $this;
  51.     }
  52.     public function getType(): ?string
  53.     {
  54.         return $this->type;
  55.     }
  56.     public function setType(?string $type): self
  57.     {
  58.         $this->type $type;
  59.         return $this;
  60.     }
  61. }