<?php
namespace App\Entity;
use App\Validator as ConforcatAssert;
use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ConforcatAssert\ConstraintHorarioReserva(startField = "inicio", endField = "fin", minutes = 30)
*/
class HorarioReserva extends \App\Entity\BaseEntity
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $inicio;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $fin;
/**
* @ORM\ManyToOne(targetEntity=\App\Entity\Reserva::class, inversedBy="horarioReservas")
* @ORM\JoinColumn(name="reserva_id", referencedColumnName="id")
*/
private $reserva;
public function getId(): ?int
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
return $this;
}
public function getInicio(): ?DateTimeInterface
{
return $this->inicio;
}
public function setInicio(?DateTimeInterface $inicio): static
{
$this->inicio = $inicio;
return $this;
}
public function getFin(): ?DateTimeInterface
{
return $this->fin;
}
public function setFin(?DateTimeInterface $fin): static
{
$this->fin = $fin;
return $this;
}
public function getReserva(): ?Reserva
{
return $this->reserva;
}
public function setReserva(?Reserva $reserva): static
{
$this->reserva = $reserva;
return $this;
}
}