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\OneToMany(targetEntityReponse::class, mappedBy'session')]
  26.     private Collection $reponses;
  27.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  28.     private ?\DateTimeInterface $createdAt null;
  29.     #[ORM\ManyToOne(inversedBy'sessions')]
  30.     private ?Employee $employee null;
  31.     #[ORM\Column(length50)]
  32.     private ?string $lang null;
  33.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  34.     private ?\DateTimeInterface $birthdate null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $employeeFunction null;
  37.     public function __construct()
  38.     {
  39.         $this->reponses = new ArrayCollection();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getName(): ?string
  46.     {
  47.         return $this->name;
  48.     }
  49.     public function setName(string $name): static
  50.     {
  51.         $this->name $name;
  52.         return $this;
  53.     }
  54.     public function getEmail(): ?string
  55.     {
  56.         return $this->email;
  57.     }
  58.     public function setEmail(string $email): static
  59.     {
  60.         $this->email $email;
  61.         return $this;
  62.     }
  63.     public function getMessage(): ?string
  64.     {
  65.         return $this->message;
  66.     }
  67.     public function setMessage(?string $message): static
  68.     {
  69.         $this->message $message;
  70.         return $this;
  71.     }
  72.     public function getReviewForm(): ?ReviewForm
  73.     {
  74.         return $this->reviewForm;
  75.     }
  76.     public function setReviewForm(?ReviewForm $reviewForm): static
  77.     {
  78.         $this->reviewForm $reviewForm;
  79.         return $this;
  80.     }
  81.     public function getStatus(): ?int
  82.     {
  83.         return $this->status;
  84.     }
  85.     public function setStatus(int $status): static
  86.     {
  87.         $this->status $status;
  88.         return $this;
  89.     }
  90.     /**
  91.      * @return Collection<int, Reponse>
  92.      */
  93.     public function getReponses(): Collection
  94.     {
  95.         return $this->reponses;
  96.     }
  97.     public function addReponse(Reponse $reponse): static
  98.     {
  99.         if (!$this->reponses->contains($reponse)) {
  100.             $this->reponses->add($reponse);
  101.             $reponse->setSession($this);
  102.         }
  103.         return $this;
  104.     }
  105.     public function removeReponse(Reponse $reponse): static
  106.     {
  107.         if ($this->reponses->removeElement($reponse)) {
  108.             // set the owning side to null (unless already changed)
  109.             if ($reponse->getSession() === $this) {
  110.                 $reponse->setSession(null);
  111.             }
  112.         }
  113.         return $this;
  114.     }
  115.     public function getCreatedAt(): ?\DateTimeInterface
  116.     {
  117.         return $this->createdAt;
  118.     }
  119.     public function setCreatedAt(\DateTimeInterface $createdAt): static
  120.     {
  121.         $this->createdAt $createdAt;
  122.         return $this;
  123.     }
  124.     public function getEmployee(): ?Employee
  125.     {
  126.         return $this->employee;
  127.     }
  128.     public function setEmployee(?Employee $employee): static
  129.     {
  130.         $this->employee $employee;
  131.         return $this;
  132.     }
  133.     public function getLang(): ?string
  134.     {
  135.         return $this->lang;
  136.     }
  137.     public function setLang(string $lang): static
  138.     {
  139.         $this->lang $lang;
  140.         return $this;
  141.     }
  142.     public function getBirthdate(): ?\DateTimeInterface
  143.     {
  144.         return $this->birthdate;
  145.     }
  146.     public function setBirthdate(?\DateTimeInterface $birthdate): static
  147.     {
  148.         $this->birthdate $birthdate;
  149.         return $this;
  150.     }
  151.     public function getEmployeeFunction(): ?string
  152.     {
  153.         return $this->employeeFunction;
  154.     }
  155.     public function setEmployeeFunction(?string $employeeFunction): static
  156.     {
  157.         $this->employeeFunction $employeeFunction;
  158.         return $this;
  159.     }
  160. }