src/Entity/OpeningHours.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OpeningHoursRepository;
  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(repositoryClassOpeningHoursRepository::class)]
  9. class OpeningHours
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  16.     private ?\DateTimeInterface $timeFrom null;
  17.     #[ORM\Column(typeTypes::TIME_MUTABLE)]
  18.     private ?\DateTimeInterface $timeTill null;
  19.     #[ORM\ManyToOne(inversedBy'openingHours'targetEntityNode::class)]
  20.     #[ORM\JoinColumn(name'node_id'referencedColumnName'id')]
  21.     private ?Node $node null;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getTimeFrom(): ?\DateTimeInterface
  27.     {
  28.         return $this->timeFrom;
  29.     }
  30.     public function setTimeFrom(\DateTimeInterface $timeFrom): static
  31.     {
  32.         $this->timeFrom $timeFrom;
  33.         return $this;
  34.     }
  35.     public function getTimeTill(): ?\DateTimeInterface
  36.     {
  37.         return $this->timeTill;
  38.     }
  39.     public function setTimeTill(\DateTimeInterface $timeTill): static
  40.     {
  41.         $this->timeTill $timeTill;
  42.         return $this;
  43.     }
  44.     public function getNode(): ?Node
  45.     {
  46.         return $this->node;
  47.     }
  48.     public function setNode(?Node $node): void
  49.     {
  50.         $this->node $node;
  51.     }
  52. }