<?php
namespace App\Entity;
use App\Repository\OpeningHoursRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: OpeningHoursRepository::class)]
class OpeningHours
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::TIME_MUTABLE)]
private ?\DateTimeInterface $timeFrom = null;
#[ORM\Column(type: Types::TIME_MUTABLE)]
private ?\DateTimeInterface $timeTill = null;
#[ORM\ManyToOne(inversedBy: 'openingHours', targetEntity: Node::class)]
#[ORM\JoinColumn(name: 'node_id', referencedColumnName: 'id')]
private ?Node $node = null;
public function getId(): ?int
{
return $this->id;
}
public function getTimeFrom(): ?\DateTimeInterface
{
return $this->timeFrom;
}
public function setTimeFrom(\DateTimeInterface $timeFrom): static
{
$this->timeFrom = $timeFrom;
return $this;
}
public function getTimeTill(): ?\DateTimeInterface
{
return $this->timeTill;
}
public function setTimeTill(\DateTimeInterface $timeTill): static
{
$this->timeTill = $timeTill;
return $this;
}
public function getNode(): ?Node
{
return $this->node;
}
public function setNode(?Node $node): void
{
$this->node = $node;
}
}