|
|
@@ -0,0 +1,116 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+declare(strict_types=1);
|
|
|
+
|
|
|
+namespace App\Entity\Booking;
|
|
|
+
|
|
|
+use App\Entity\Traits\CreatedOnAndByTrait;
|
|
|
+use Doctrine\ORM\Mapping as ORM;
|
|
|
+use Symfony\Component\Validator\Constraints as Assert;
|
|
|
+
|
|
|
+#[ORM\Entity]
|
|
|
+class Presence
|
|
|
+{
|
|
|
+ use CreatedOnAndByTrait;
|
|
|
+
|
|
|
+ #[ORM\Column(type: 'integer')]
|
|
|
+ #[ORM\Id]
|
|
|
+ #[ORM\GeneratedValue(strategy: 'AUTO')]
|
|
|
+ private ?int $id = null;
|
|
|
+
|
|
|
+ #[ORM\Column(type: 'json', nullable: true)]
|
|
|
+ private ?array $accessesId = null;
|
|
|
+
|
|
|
+ #[ORM\ManyToOne(targetEntity: Course::class, inversedBy: 'presences')]
|
|
|
+ private ?Course $course = null;
|
|
|
+
|
|
|
+ #[ORM\ManyToOne(targetEntity: EducationalProject::class, inversedBy: 'presences')]
|
|
|
+ private ?EducationalProject $educationalProject = null;
|
|
|
+
|
|
|
+ #[ORM\ManyToOne(targetEntity: Event::class, inversedBy: 'presences')]
|
|
|
+ private ?Event $event = null;
|
|
|
+
|
|
|
+ #[ORM\ManyToOne(targetEntity: Examen::class, inversedBy: 'presences')]
|
|
|
+ private ?Examen $examen = null;
|
|
|
+
|
|
|
+ #[ORM\Column(type: 'datetime', nullable: true)]
|
|
|
+ #[Assert\DateTime]
|
|
|
+ private ?\DateTimeInterface $datetimeStart = null;
|
|
|
+
|
|
|
+ public function getId(): ?int
|
|
|
+ {
|
|
|
+ return $this->id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getAccessesId(): ?array
|
|
|
+ {
|
|
|
+ return $this->accessesId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setAccessesId(?array $accessesId): self
|
|
|
+ {
|
|
|
+ $this->accessesId = $accessesId;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getCourse(): ?Course
|
|
|
+ {
|
|
|
+ return $this->course;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setCourse(?Course $course): self
|
|
|
+ {
|
|
|
+ $this->course = $course;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getEducationalProject(): ?EducationalProject
|
|
|
+ {
|
|
|
+ return $this->educationalProject;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setEducationalProject(?EducationalProject $educationalProject): self
|
|
|
+ {
|
|
|
+ $this->educationalProject = $educationalProject;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getEvent(): ?Event
|
|
|
+ {
|
|
|
+ return $this->event;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setEvent(?Event $event): self
|
|
|
+ {
|
|
|
+ $this->event = $event;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getExamen(): ?Examen
|
|
|
+ {
|
|
|
+ return $this->examen;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setExamen(?Examen $examen): self
|
|
|
+ {
|
|
|
+ $this->examen = $examen;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getDatetimeStart(): ?\DateTimeInterface
|
|
|
+ {
|
|
|
+ return $this->datetimeStart;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function setDatetimeStart(?\DateTimeInterface $datetimeStart): self
|
|
|
+ {
|
|
|
+ $this->datetimeStart = $datetimeStart;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+}
|