*/ #[ORM\OneToMany(targetEntity: BookingRoom::class, mappedBy: 'Booking', orphanRemoval: true, cascade: ['persist'])] private Collection $bookingRooms; #[ORM\Column(length: 20)] private ?string $refNumber = null; public function __construct() { $this->bookingRooms = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getArrivalDate(): ?\DateTimeInterface { return $this->ArrivalDate; } public function setArrivalDate(\DateTimeInterface $ArrivalDate): static { $this->ArrivalDate = $ArrivalDate; return $this; } public function getDepartureDate(): ?\DateTimeInterface { return $this->DepartureDate; } public function setDepartureDate(\DateTimeInterface $DepartureDate): static { $this->DepartureDate = $DepartureDate; return $this; } public function getBookingTime(): ?\DateTimeInterface { return $this->BookingTime; } public function setBookingTime(\DateTimeInterface $BookingTime): static { $this->BookingTime = $BookingTime; return $this; } public function getBookingCustomer(): ?BookingCustomer { return $this->bookingCustomer; } public function setBookingCustomer(BookingCustomer $bookingCustomer): static { // set the owning side of the relation if necessary if ($bookingCustomer->getBooking() !== $this) { $bookingCustomer->setBooking($this); } $this->bookingCustomer = $bookingCustomer; return $this; } /** * @return Collection */ public function getBookingRooms(): Collection { return $this->bookingRooms; } public function addBookingRoom(BookingRoom $bookingRoom): static { if (!$this->bookingRooms->contains($bookingRoom)) { $this->bookingRooms->add($bookingRoom); $bookingRoom->setBooking($this); } return $this; } public function removeBookingRoom(BookingRoom $bookingRoom): static { if ($this->bookingRooms->removeElement($bookingRoom)) { // set the owning side to null (unless already changed) if ($bookingRoom->getBooking() === $this) { $bookingRoom->setBooking(null); } } return $this; } public function getRefNumber(): ?string { return $this->refNumber; } public function setRefNumber(string $refNumber): static { $this->refNumber = $refNumber; return $this; } function __toString(): string { return $this->getRefNumber(); } }