src/Entity/HorarioReserva.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Validator as ConforcatAssert;
  4. use DateTimeInterface;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity
  9. * @ConforcatAssert\ConstraintHorarioReserva(startField = "inicio", endField = "fin", minutes = 30)
  10. */
  11. class HorarioReserva extends \App\Entity\BaseEntity
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\Column(type="integer")
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private $id;
  19. /**
  20. * @ORM\Column(type="datetime", nullable=true)
  21. */
  22. private $inicio;
  23. /**
  24. * @ORM\Column(type="datetime", nullable=true)
  25. */
  26. private $fin;
  27. /**
  28. * @ORM\ManyToOne(targetEntity=\App\Entity\Reserva::class, inversedBy="horarioReservas")
  29. * @ORM\JoinColumn(name="reserva_id", referencedColumnName="id")
  30. */
  31. private $reserva;
  32. public function getId(): ?int
  33. {
  34. return $this->id;
  35. }
  36. public function setId($id)
  37. {
  38. $this->id = $id;
  39. return $this;
  40. }
  41. public function getInicio(): ?DateTimeInterface
  42. {
  43. return $this->inicio;
  44. }
  45. public function setInicio(?DateTimeInterface $inicio): static
  46. {
  47. $this->inicio = $inicio;
  48. return $this;
  49. }
  50. public function getFin(): ?DateTimeInterface
  51. {
  52. return $this->fin;
  53. }
  54. public function setFin(?DateTimeInterface $fin): static
  55. {
  56. $this->fin = $fin;
  57. return $this;
  58. }
  59. public function getReserva(): ?Reserva
  60. {
  61. return $this->reserva;
  62. }
  63. public function setReserva(?Reserva $reserva): static
  64. {
  65. $this->reserva = $reserva;
  66. return $this;
  67. }
  68. }