src/Entity/Schedules.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SchedulesRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassSchedulesRepository::class)]
  8. class Schedules
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     #[Groups(["getReservation"])]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?Project $project null;
  18.     #[ORM\ManyToOne(inversedBy'schedules')]
  19.     private ?Reservation $reservation null;
  20.     #[ORM\OneToOne(mappedBy'schedules'cascade: ['persist''remove'])]
  21.     private ?Time $time null;
  22.     #[ORM\ManyToOne]
  23.     #[ORM\JoinColumn(nullablefalse)]
  24.     private ?User $user null;
  25.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  26.     private ?\DateTimeInterface $date null;
  27.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  28.     private ?\DateTimeInterface $startTime null;
  29.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  30.     private ?\DateTimeInterface $endTime null;
  31.     #[ORM\Column]
  32.     private ?bool $inClosure false;
  33.     #[ORM\Column]
  34.     private ?bool $inClosureClient false;
  35.     #[ORM\ManyToOne(inversedBy'schedules')]
  36.     private ?ClosureClient $clientClosure null;
  37.     #[ORM\ManyToOne(inversedBy'schedules')]
  38.     private ?Closure $Closure null;
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getProject(): ?Project
  44.     {
  45.         return $this->project;
  46.     }
  47.     public function setProject(?Project $project): self
  48.     {
  49.         $this->project $project;
  50.         return $this;
  51.     }
  52.     public function getStartDate(): ?\DateTimeInterface
  53.     {
  54.         return $this->startDate;
  55.     }
  56.     public function setStartDate(\DateTimeInterface $startDate): self
  57.     {
  58.         $this->startDate $startDate;
  59.         return $this;
  60.     }
  61.     public function getEndDate(): ?\DateTimeInterface
  62.     {
  63.         return $this->endDate;
  64.     }
  65.     public function setEndDate(\DateTimeInterface $endDate): self
  66.     {
  67.         $this->endDate $endDate;
  68.         return $this;
  69.     }
  70.     public function getReservation(): ?Reservation
  71.     {
  72.         return $this->reservation;
  73.     }
  74.     public function setReservation(?Reservation $reservation): self
  75.     {
  76.         $this->reservation $reservation;
  77.         return $this;
  78.     }
  79.     public function getTime(): ?Time
  80.     {
  81.         return $this->time;
  82.     }
  83.     public function setTime(?Time $time): self
  84.     {
  85.         // unset the owning side of the relation if necessary
  86.         if ($time === null && $this->time !== null) {
  87.             $this->time->setSchedules(null);
  88.         }
  89.         // set the owning side of the relation if necessary
  90.         if ($time !== null && $time->getSchedules() !== $this) {
  91.             $time->setSchedules($this);
  92.         }
  93.         $this->time $time;
  94.         return $this;
  95.     }
  96.     public function getUser(): ?User
  97.     {
  98.         return $this->user;
  99.     }
  100.     public function setUser(?User $user): self
  101.     {
  102.         $this->user $user;
  103.         return $this;
  104.     }
  105.     public function getDate(): ?\DateTimeInterface
  106.     {
  107.         return $this->date;
  108.     }
  109.     public function setDate(\DateTimeInterface $date): self
  110.     {
  111.         $this->date $date;
  112.         return $this;
  113.     }
  114.     public function getStartTime(): ?\DateTimeInterface
  115.     {
  116.         return $this->startTime;
  117.     }
  118.     public function setStartTime(\DateTimeInterface $startTime): self
  119.     {
  120.         $this->startTime $startTime;
  121.         return $this;
  122.     }
  123.     public function getEndTime(): ?\DateTimeInterface
  124.     {
  125.         return $this->endTime;
  126.     }
  127.     public function setEndTime(\DateTimeInterface $endTime): self
  128.     {
  129.         $this->endTime $endTime;
  130.         return $this;
  131.     }
  132.     public function isInClosure(): ?bool
  133.     {
  134.         return $this->inClosure;
  135.     }
  136.     public function setInClosure(bool $inClosure): self
  137.     {
  138.         $this->inClosure $inClosure;
  139.         return $this;
  140.     }
  141.     public function isInClosureClient(): ?bool
  142.     {
  143.         return $this->inClosureClient;
  144.     }
  145.     public function setInClosureClient(bool $inClosureClient): self
  146.     {
  147.         $this->inClosureClient $inClosureClient;
  148.         return $this;
  149.     }
  150.     public function getClientClosure(): ?ClosureClient
  151.     {
  152.         return $this->clientClosure;
  153.     }
  154.     public function setClientClosure(?ClosureClient $clientClosure): self
  155.     {
  156.         $this->clientClosure $clientClosure;
  157.         return $this;
  158.     }
  159.     public function getClosure(): ?Closure
  160.     {
  161.         return $this->Closure;
  162.     }
  163.     public function setClosure(?Closure $Closure): self
  164.     {
  165.         $this->Closure $Closure;
  166.         return $this;
  167.     }
  168. }