add element domain
This commit is contained in:
parent
52a2bd6e6b
commit
9029eb5ff8
1 changed files with 47 additions and 0 deletions
47
backend/app/Element/Element.php
Normal file
47
backend/app/Element/Element.php
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Element;
|
||||||
|
|
||||||
|
use App\Set\Set;
|
||||||
|
|
||||||
|
final readonly class Element
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private int $id,
|
||||||
|
private string $name,
|
||||||
|
private string $kind,
|
||||||
|
private Set $set,
|
||||||
|
private ?Element $parentElement,
|
||||||
|
private int $position,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
public function getId(): int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName(): string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getKind(): string
|
||||||
|
{
|
||||||
|
return $this->kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSet(): Set
|
||||||
|
{
|
||||||
|
return $this->set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getParentElement(): ?Element
|
||||||
|
{
|
||||||
|
return $this->parentElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPosition(): int
|
||||||
|
{
|
||||||
|
return $this->position;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue