Fixed duplicated fields on /api/booking/details and removed unnecesary ignore attributes.

This commit is contained in:
2024-09-28 00:03:05 +02:00
parent bfcd04c701
commit 986f422824
8 changed files with 65 additions and 73 deletions
+21 -24
View File
@@ -12,56 +12,53 @@ class BookingRoom
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Ignore]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'bookingRooms')]
#[ORM\JoinColumn(nullable: false, onDelete: "CASCADE")]
#[Ignore]
private ?Booking $Booking = null;
private ?Booking $booking = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
#[Ignore]
private ?RoomCategory $RoomCategory = null;
private ?RoomCategory $roomCategory = null;
#[ORM\Column]
private ?int $GuestNumber = null;
private ?int $guestNumber = null;
#[ORM\Column]
private ?int $RoomPrice = null;
private ?int $roomPrice = null;
#[ORM\Column]
private ?int $Amount = null;
private ?int $amount = null;
public function getId(): ?int
{
return $this->id;
}
#[Ignore]
public function getBooking(): ?Booking
{
return $this->Booking;
return $this->booking;
}
#[Ignore]
public function setBooking(?Booking $Booking): static
public function setBooking(?Booking $booking): static
{
$this->Booking = $Booking;
$this->booking = $booking;
return $this;
}
#[Ignore]
public function getRoomCategory(): ?RoomCategory
{
return $this->RoomCategory;
return $this->roomCategory;
}
#[Ignore]
public function setRoomCategory(?RoomCategory $RoomCategory): static
public function setRoomCategory(?RoomCategory $roomCategory): static
{
$this->RoomCategory = $RoomCategory;
$this->roomCategory = $roomCategory;
return $this;
}
@@ -73,36 +70,36 @@ class BookingRoom
public function getGuestNumber(): ?int
{
return $this->GuestNumber;
return $this->guestNumber;
}
public function setGuestNumber(int $GuestNumber): static
public function setGuestNumber(int $guestNumber): static
{
$this->GuestNumber = $GuestNumber;
$this->guestNumber = $guestNumber;
return $this;
}
public function getRoomPrice(): ?int
{
return $this->RoomPrice;
return $this->roomPrice;
}
public function setRoomPrice(int $RoomPrice): static
public function setRoomPrice(int $roomPrice): static
{
$this->RoomPrice = $RoomPrice;
$this->roomPrice = $roomPrice;
return $this;
}
public function getAmount(): ?int
{
return $this->Amount;
return $this->amount;
}
public function setAmount(int $Amount): static
public function setAmount(int $amount): static
{
$this->Amount = $Amount;
$this->amount = $amount;
return $this;
}