feat: group resources into rooms on the floor plan

This commit is contained in:
fromme committed 2026-09-14 08:25:05 +02:00
1 parent faef4d70a8
commit 8caf618950
14 files changed
+653 -34

No files matched your search

+18
View File
@@ -34,6 +34,14 @@ class Resource
#[ORM\Column(length: 50, nullable: true)]
private ?string $svgElementId = null;
/**
* Where it physically is. Nullable because a group is optional: a kind of resource that is
* not split across rooms simply has none, and its plan draws its own single frame.
*/
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?ResourceGroup $group = null;
/**
* Retired resources stay in the table so historical bookings keep resolving; they are just
* not offered any more.
@@ -78,6 +86,16 @@ class Resource
$this->svgElementId = $svgElementId;
}
public function getGroup(): ?ResourceGroup
{
return $this->group;
}
public function setGroup(?ResourceGroup $group): void
{
$this->group = $group;
}
public function isActive(): bool
{
return $this->active;