This commit is contained in:
2022-10-05 15:23:28 +02:00
parent 58b1778544
commit a967e1ed17
194 changed files with 1580 additions and 1386 deletions

View File

@@ -15,7 +15,7 @@ use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="chill_main_geographical_unit", uniqueConstraints={
* @ORM\UniqueConstraint(name="geographical_unit_refid", columns={"layer_id", "unitRefId"})
* @ORM\UniqueConstraint(name="geographical_unit_refid", columns={"layer_id", "unitRefId"})
* })
* @ORM\Entity(readOnly=true)
*/
@@ -33,6 +33,11 @@ class GeographicalUnit
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=GeographicalUnitLayer::class, inversedBy="units")
*/
private ?GeographicalUnitLayer $layer;
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
@@ -43,21 +48,14 @@ class GeographicalUnit
*/
private string $unitRefId;
/**
* @ORM\ManyToOne(targetEntity=GeographicalUnitLayer::class, inversedBy="units")
*/
private ?GeographicalUnitLayer $layer;
public function getId(): ?int
{
return $this->id;
}
protected function setId(int $id): self
public function getLayer(): ?GeographicalUnitLayer
{
$this->id = $id;
return $this;
return $this->layer;
}
public function getUnitName(): ?string
@@ -65,31 +63,10 @@ class GeographicalUnit
return $this->unitName;
}
/**
* @return GeographicalUnitLayer|null
*/
public function getLayer(): ?GeographicalUnitLayer
{
return $this->layer;
}
/**
* @param string $unitRefId
* @return GeographicalUnit
*/
public function setUnitRefId(string $unitRefId): GeographicalUnit
{
$this->unitRefId = $unitRefId;
return $this;
}
/**
* @param GeographicalUnitLayer|null $layer
* @return GeographicalUnit
*/
public function setLayer(?GeographicalUnitLayer $layer): GeographicalUnit
{
$this->layer = $layer;
return $this;
}
@@ -99,4 +76,18 @@ class GeographicalUnit
return $this;
}
public function setUnitRefId(string $unitRefId): GeographicalUnit
{
$this->unitRefId = $unitRefId;
return $this;
}
protected function setId(int $id): self
{
$this->id = $id;
return $this;
}
}