RoomCateryBedType - API and admin panel improvements.

This commit is contained in:
2024-09-12 18:08:33 +02:00
parent 06577df0ad
commit 7475be603c
5 changed files with 65 additions and 17 deletions
+11
View File
@@ -12,6 +12,7 @@ class RoomCategoryBedType
#[ORM\Id]
#[ORM\ManyToOne(inversedBy: 'roomCategoryBedTypes')]
#[ORM\JoinColumn(nullable: false, onDelete: "CASCADE")]
#[Ignore]
private ?RoomCategory $roomCategory = null;
#[ORM\Id]
@@ -53,15 +54,25 @@ class RoomCategoryBedType
return $this;
}
#[Ignore]
public function getBedType(): ?BedType
{
return $this->bedType;
}
#[Ignore]
public function setBedType(?BedType $bedType): static
{
$this->bedType = $bedType;
return $this;
}
public function getBedTypeName(): string {
return $this->getBedType()->getName();
}
public function getBedTypeIcon(): string {
return $this->getBedType()->getIconUrl();
}
}
+2
View File
@@ -12,6 +12,7 @@ class RoomCategoryPhoto
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Ignore]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: false)]
@@ -28,6 +29,7 @@ class RoomCategoryPhoto
#[Ignore]
private ?RoomCategory $roomCategory = null;
#[Ignore]
public function getId(): ?int
{
return $this->id;