feat: group resources into rooms on the floor plan
This commit is contained in:
1 parent
faef4d70a8
commit
8caf618950
14 files changed
+653
-34
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user