mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Feature: aggregator for accompanying course by geographical level
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user