Feature: add a proper entity for geographical unit layer

This commit is contained in:
2022-10-03 13:50:10 +02:00
parent e1fda324a4
commit 994160f28a
3 changed files with 125 additions and 6 deletions

View File

@@ -15,14 +15,14 @@ use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="chill_main_geographical_unit")
* @ORM\Entity
* @ORM\Entity(readOnly=true)
*/
class GeographicalUnit
{
/**
* @ORM\Column(type="text", nullable=true)
*/
private $geom;
private string $geom;
/**
* @ORM\Id
@@ -32,14 +32,19 @@ class GeographicalUnit
private ?int $id = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
private $layerName;
private string $unitName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
private $unitName;
private string $unitRefId;
/**
* @ORM\ManyToOne(targetEntity=GeographicalUnitLayer::class)
*/
private ?GeographicalUnitLayer $layer;
public function getId(): ?int
{