Added RoomCategory BedType support in AdminPanel
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\BedTypeRepository;
|
||||
use Symfony\Component\Serializer\Annotation\Ignore;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: BedTypeRepository::class)]
|
||||
@@ -47,4 +48,8 @@ class BedType
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __toString(): string {
|
||||
return $this->getName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\RoomCategoryBedTypeRepository;
|
||||
use Symfony\Component\Serializer\Annotation\Ignore;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: RoomCategoryBedTypeRepository::class)]
|
||||
@@ -21,10 +22,10 @@ class RoomCategoryBedType
|
||||
#[ORM\Column]
|
||||
private ?int $amount = null;
|
||||
|
||||
public function __construct(RoomCategory $roomCat, BedType $bedType) {
|
||||
$this->roomCategory = $roomCat;
|
||||
$this->bedType = $bedType;
|
||||
}
|
||||
// public function __construct(RoomCategory $roomCat, BedType $bedType) {
|
||||
// $this->roomCategory = $roomCat;
|
||||
// $this->bedType = $bedType;
|
||||
// }
|
||||
|
||||
public function getAmount(): ?int
|
||||
{
|
||||
@@ -38,11 +39,13 @@ class RoomCategoryBedType
|
||||
return $this;
|
||||
}
|
||||
|
||||
#[Ignore]
|
||||
public function getRoomCategory(): ?RoomCategory
|
||||
{
|
||||
return $this->roomCategory;
|
||||
}
|
||||
|
||||
#[Ignore]
|
||||
public function setRoomCategory(?RoomCategory $roomCategory): static
|
||||
{
|
||||
$this->roomCategory = $roomCategory;
|
||||
|
||||
Reference in New Issue
Block a user