src/Entity/Session.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SessionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassSessionRepository::class)]
  9. class Session
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $name null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $email null;
  19.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  20.     private ?string $message null;
  21.     #[ORM\ManyToOne(inversedBy'sessions')]
  22.     private ?ReviewForm $reviewForm null;
  23.     #[ORM\Column]
  24.     private ?int $status null;
  25.     #[ORM\Column(options: ['default' => false])]
  26.     private bool $sent false;
  27.     #[ORM\OneToMany(targetEntityReponse::class, mappedBy'session')]
  28.     private Collection $reponses;
  29.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  30.     private ?\DateTimeInterface $createdAt null;
  31.     #[ORM\ManyToOne(inversedBy'sessions')]
  32.     private ?Employee $employee null;
  33.     #[ORM\Column(length50)]
  34.     private ?string $lang null;
  35.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  36.     private ?\DateTimeInterface $birthdate null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $employeeFunction null;
  39.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  40.     private ?string $analyse null;
  41.     #[ORM\Column(type'json'nullabletrue)]
  42.     private ?array $demographics null;
  43.     public function __construct()
  44.     {
  45.         $this->reponses = new ArrayCollection();
  46.     }
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getName(): ?string
  52.     {
  53.         return $this->name;
  54.     }
  55.     public function setName(string $name): static
  56.     {
  57.         $this->name $name;
  58.         return $this;
  59.     }
  60.     public function getEmail(): ?string
  61.     {
  62.         return $this->email;
  63.     }
  64.     public function setEmail(string $email): static
  65.     {
  66.         $this->email $email;
  67.         return $this;
  68.     }
  69.     public function getMessage(): ?string
  70.     {
  71.         return $this->message;
  72.     }
  73.     public function setMessage(?string $message): static
  74.     {
  75.         $this->message $message;
  76.         return $this;
  77.     }
  78.     public function getReviewForm(): ?ReviewForm
  79.     {
  80.         return $this->reviewForm;
  81.     }
  82.     public function setReviewForm(?ReviewForm $reviewForm): static
  83.     {
  84.         $this->reviewForm $reviewForm;
  85.         return $this;
  86.     }
  87.     public function getStatus(): ?int
  88.     {
  89.         return $this->status;
  90.     }
  91.     public function setStatus(int $status): static
  92.     {
  93.         $this->status $status;
  94.         return $this;
  95.     }
  96.     public function isSent(): bool
  97.     {
  98.         return $this->sent;
  99.     }
  100.     public function setSent(bool $sent): static
  101.     {
  102.         $this->sent $sent;
  103.         return $this;
  104.     }
  105.     /**
  106.      * @return Collection<int, Reponse>
  107.      */
  108.     public function getReponses(): Collection
  109.     {
  110.         return $this->reponses;
  111.     }
  112.     public function addReponse(Reponse $reponse): static
  113.     {
  114.         if (!$this->reponses->contains($reponse)) {
  115.             $this->reponses->add($reponse);
  116.             $reponse->setSession($this);
  117.         }
  118.         return $this;
  119.     }
  120.     public function removeReponse(Reponse $reponse): static
  121.     {
  122.         if ($this->reponses->removeElement($reponse)) {
  123.             // set the owning side to null (unless already changed)
  124.             if ($reponse->getSession() === $this) {
  125.                 $reponse->setSession(null);
  126.             }
  127.         }
  128.         return $this;
  129.     }
  130.     public function getCreatedAt(): ?\DateTimeInterface
  131.     {
  132.         return $this->createdAt;
  133.     }
  134.     public function setCreatedAt(\DateTimeInterface $createdAt): static
  135.     {
  136.         $this->createdAt $createdAt;
  137.         return $this;
  138.     }
  139.     public function getEmployee(): ?Employee
  140.     {
  141.         return $this->employee;
  142.     }
  143.     public function setEmployee(?Employee $employee): static
  144.     {
  145.         $this->employee $employee;
  146.         return $this;
  147.     }
  148.     public function getLang(): ?string
  149.     {
  150.         return $this->lang;
  151.     }
  152.     public function setLang(string $lang): static
  153.     {
  154.         $this->lang $lang;
  155.         return $this;
  156.     }
  157.     public function getBirthdate(): ?\DateTimeInterface
  158.     {
  159.         return $this->birthdate;
  160.     }
  161.     public function setBirthdate(?\DateTimeInterface $birthdate): static
  162.     {
  163.         $this->birthdate $birthdate;
  164.         return $this;
  165.     }
  166.     public function getEmployeeFunction(): ?string
  167.     {
  168.         return $this->employeeFunction;
  169.     }
  170.     public function setEmployeeFunction(?string $employeeFunction): static
  171.     {
  172.         $this->employeeFunction $employeeFunction;
  173.         return $this;
  174.     }
  175.     public function getAnalyse(): ?string
  176.     {
  177.         return $this->analyse;
  178.     }
  179.     public function setAnalyse(?string $analyse): static
  180.     {
  181.         $this->analyse $analyse;
  182.         return $this;
  183.     }
  184.     public function getDemographics(): ?array 
  185.     { 
  186.         return $this->demographics
  187.     }
  188.     public function setDemographics(?array $demographics): self 
  189.     
  190.         $this->demographics $demographics
  191.         
  192.         return $this
  193.     }
  194. }