src/Entity/QuestionariIniziati.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\QuestionariIniziatiRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassQuestionariIniziatiRepository::class)]
  8. class QuestionariIniziati
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntityQuestionari::class, inversedBy'questionariIniziatis')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private $questionario;
  17.     #[ORM\ManyToOne(targetEntityUsersAmbienti::class, inversedBy'questionariIniziatis')]
  18.     private $ambiente;
  19.     #[ORM\Column(type'string'length255)]
  20.     private $user_id;
  21.     #[ORM\Column(type'string'length255nullabletrue)]
  22.     private $user_email_hash;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $user_email;
  25.     #[ORM\Column(type'integer')]
  26.     private $status;
  27.     #[ORM\Column(type'integer')]
  28.     private $last_question;
  29.     #[ORM\Column(type'datetime_immutable')]
  30.     private $created_at;
  31.     #[ORM\Column(type'datetime_immutable')]
  32.     private $modified_at;
  33.     #[ORM\Column(type'text'nullabletrue)]
  34.     private $returnurl;
  35.     #[ORM\OneToMany(mappedBy'questionario_iniziato'targetEntityRisposte::class)]
  36.     private $rispostes;
  37.     public function __construct()
  38.     {
  39.         $this->rispostes = new ArrayCollection();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getQuestionario(): ?Questionari
  46.     {
  47.         return $this->questionario;
  48.     }
  49.     public function setQuestionario(?Questionari $questionario): self
  50.     {
  51.         $this->questionario $questionario;
  52.         return $this;
  53.     }
  54.     public function getAmbiente(): ?UsersAmbienti
  55.     {
  56.         return $this->ambiente;
  57.     }
  58.     public function setAmbiente(?UsersAmbienti $ambiente): self
  59.     {
  60.         $this->ambiente $ambiente;
  61.         return $this;
  62.     }
  63.     public function getUserId(): ?string
  64.     {
  65.         return $this->user_id;
  66.     }
  67.     public function setUserId(string $user_id): self
  68.     {
  69.         $this->user_id $user_id;
  70.         return $this;
  71.     }
  72.     public function getUserEmailHash(): ?string
  73.     {
  74.         return $this->user_email_hash;
  75.     }
  76.     public function setUserEmailHash(?string $user_email_hash): self
  77.     {
  78.         $this->user_email_hash $user_email_hash;
  79.         return $this;
  80.     }
  81.     public function getUserEmail(): ?string
  82.     {
  83.         return $this->user_email;
  84.     }
  85.     public function setUserEmail(?string $user_email): self
  86.     {
  87.         $this->user_email $user_email;
  88.         return $this;
  89.     }
  90.     public function getStatus(): ?int
  91.     {
  92.         return $this->status;
  93.     }
  94.     public function setStatus(int $status): self
  95.     {
  96.         $this->status $status;
  97.         return $this;
  98.     }
  99.     public function getLastQuestion(): ?int
  100.     {
  101.         return $this->last_question;
  102.     }
  103.     public function setLastQuestion(int $last_question): self
  104.     {
  105.         $this->last_question $last_question;
  106.         return $this;
  107.     }
  108.     public function getCreatedAt(): ?\DateTimeImmutable
  109.     {
  110.         return $this->created_at;
  111.     }
  112.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  113.     {
  114.         $this->created_at $created_at;
  115.         return $this;
  116.     }
  117.     public function getModifiedAt(): ?\DateTimeImmutable
  118.     {
  119.         return $this->modified_at;
  120.     }
  121.     public function setModifiedAt(\DateTimeImmutable $modified_at): self
  122.     {
  123.         $this->modified_at $modified_at;
  124.         return $this;
  125.     }
  126.     public function getReturnurl(): ?string
  127.     {
  128.         return $this->returnurl;
  129.     }
  130.     public function setReturnurl(?string $returnurl): self
  131.     {
  132.         $this->returnurl $returnurl;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @return Collection<int, Risposte>
  137.      */
  138.     public function getRispostes(): Collection
  139.     {
  140.         return $this->rispostes;
  141.     }
  142.     public function addRisposte(Risposte $risposte): self
  143.     {
  144.         if (!$this->rispostes->contains($risposte)) {
  145.             $this->rispostes[] = $risposte;
  146.             $risposte->setQuestionarioIniziato($this);
  147.         }
  148.         return $this;
  149.     }
  150.     public function removeRisposte(Risposte $risposte): self
  151.     {
  152.         if ($this->rispostes->removeElement($risposte)) {
  153.             // set the owning side to null (unless already changed)
  154.             if ($risposte->getQuestionarioIniziato() === $this) {
  155.                 $risposte->setQuestionarioIniziato(null);
  156.             }
  157.         }
  158.         return $this;
  159.     }
  160. }