<?php
namespace App\Entity\Comercio;
use App\Entity\Infraestructura\Espacios;
use Doctrine\ORM\Mapping as ORM;
/**
* Reserva
*
* @ORM\Table(name="comercio.reserva")
* @ORM\Entity
*/
class Reserva
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="SEQUENCE")
* @ORM\SequenceGenerator(sequenceName="comercio.reserva_id_seq", allocationSize=1, initialValue=1)
*/
private $id;
/**
* @var \DateTime
*
* @ORM\Column(name="fecha_reserva", type="date", nullable=false)
*/
private $fechaReserva;
/**
* @var \DateTime
*
* @ORM\Column(name="hora_reserva", type="time", nullable=false)
*/
private $horaReserva;
/**
* @var string
*
* @ORM\Column(name="estado", type="string", length=50, nullable=false, options={"comment"="Reservado
Atendida"})
*/
private $estado;
/**
* @var int
*
* @ORM\Column(name="numero_personas", type="smallint", nullable=false)
*/
private $numeroPersonas;
/**
* @var int
*
* @ORM\Column(name="porcentaje_abono", type="smallint", nullable=false)
*/
private $porcentajeAbono;
/**
* @var string|null
*
* @ORM\Column(name="observaciones", type="text", nullable=true)
*/
private $observaciones;
/**
* @var int
*
* @ORM\Column(name="id_usuario_modificacion", type="integer", nullable=false)
*/
private $idUsuarioModificacion;
/**
* @var \DateTime
*
* @ORM\Column(name="fecha_modificacion", type="datetime", nullable=false)
*/
private $fechaModificacion;
/**
* @var string
*
* @ORM\Column(name="ip_modificacion", type="string", length=50, nullable=false)
*/
private $ipModificacion;
/**
* @var \Cuenta
*
* @ORM\ManyToOne(targetEntity="Cuenta")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="id_cuenta", referencedColumnName="id")
* })
*/
private $idCuenta;
/**
* @var \App\Entity\Infraestructura\Espacios
*
* @ORM\ManyToOne(targetEntity="App\Entity\Infraestructura\Espacios")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="id_espacios", referencedColumnName="id")
* })
*/
private $idEspacios;
public function getId(): ?int
{
return $this->id;
}
public function getFechaReserva(): ?\DateTimeInterface
{
return $this->fechaReserva;
}
public function getFechaReservaString(): ?string
{
return $this->fechaReserva ? $this->fechaReserva->format('Y-m-d') : '';
}
public function setFechaReserva(\DateTimeInterface $fechaReserva): self
{
$this->fechaReserva = $fechaReserva;
return $this;
}
public function getHoraReserva(): ?\DateTimeInterface
{
return $this->horaReserva;
}
public function getHoraReservaString(): ?string
{
return $this->horaReserva ? $this->horaReserva->format('H:i') : '';
}
public function setHoraReserva(\DateTimeInterface $horaReserva): self
{
$this->horaReserva = $horaReserva;
return $this;
}
public function getEstado(): ?string
{
return $this->estado;
}
public function setEstado(string $estado): self
{
$this->estado = $estado;
return $this;
}
public function getNumeroPersonas(): ?int
{
return $this->numeroPersonas;
}
public function setNumeroPersonas(int $numeroPersonas): self
{
$this->numeroPersonas = $numeroPersonas;
return $this;
}
public function getPorcentajeAbono(): ?int
{
return $this->porcentajeAbono;
}
public function setPorcentajeAbono(int $porcentajeAbono): self
{
$this->porcentajeAbono = $porcentajeAbono;
return $this;
}
public function getObservaciones(): ?string
{
return $this->observaciones;
}
public function setObservaciones(?string $observaciones): self
{
$this->observaciones = $observaciones;
return $this;
}
public function getIdUsuarioModificacion(): ?int
{
return $this->idUsuarioModificacion;
}
public function setIdUsuarioModificacion(int $idUsuarioModificacion): self
{
$this->idUsuarioModificacion = $idUsuarioModificacion;
return $this;
}
public function getFechaModificacion(): ?\DateTimeInterface
{
return $this->fechaModificacion;
}
public function setFechaModificacion(\DateTimeInterface $fechaModificacion): self
{
$this->fechaModificacion = $fechaModificacion;
return $this;
}
public function getIpModificacion(): ?string
{
return $this->ipModificacion;
}
public function setIpModificacion(string $ipModificacion): self
{
$this->ipModificacion = $ipModificacion;
return $this;
}
public function getIdCuenta(): ?Cuenta
{
return $this->idCuenta;
}
public function setIdCuenta(?Cuenta $idCuenta): self
{
$this->idCuenta = $idCuenta;
return $this;
}
public function getIdEspacios(): ?Espacios
{
return $this->idEspacios;
}
public function setIdEspacios(?Espacios $idEspacios): self
{
$this->idEspacios = $idEspacios;
return $this;
}
}