mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-23 07:04:58 +00:00
Feature: allow to administrate budget resources and charges from the admin
This commit is contained in:
@@ -31,6 +31,12 @@ class Resource extends AbstractElement implements HasCentersInterface
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=ResourceKind::class, inversedBy="AbstractElement")
|
||||
* @ORM\JoinColumn
|
||||
*/
|
||||
private ?ResourceKind $resource = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->setStartDate(new DateTimeImmutable('today'));
|
||||
@@ -55,6 +61,11 @@ class Resource extends AbstractElement implements HasCentersInterface
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getResource(): ?ResourceKind
|
||||
{
|
||||
return $this->resource;
|
||||
}
|
||||
|
||||
public function isCharge(): bool
|
||||
{
|
||||
return false;
|
||||
@@ -64,4 +75,11 @@ class Resource extends AbstractElement implements HasCentersInterface
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function setResource(?ResourceKind $resource): self
|
||||
{
|
||||
$this->resource = $resource;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user