Feature: aggregator for accompanying course by geographical level

This commit is contained in:
2022-10-03 18:20:13 +02:00
parent 65f6712a15
commit 52435f5331
6 changed files with 228 additions and 23 deletions

View File

@@ -2,6 +2,8 @@
namespace Chill\MainBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
@@ -29,6 +31,16 @@ class GeographicalUnitLayer
*/
private string $refId = '';
/**
* @ORM\OneToMany(targetEntity=GeographicalUnit::class, mappedBy="layer")
*/
private Collection $units;
public function __construct()
{
$this->units = new ArrayCollection();
}
/**
* @return int|null
*/
@@ -54,4 +66,20 @@ class GeographicalUnitLayer
$this->name = $name;
return $this;
}
/**
* @return string
*/
public function getRefId(): string
{
return $this->refId;
}
/**
* @return Collection
*/
public function getUnits(): Collection
{
return $this->units;
}
}