From 660de0837722b76c9e8ff539afb3e11d13040642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Tue, 3 Jun 2025 15:34:45 +0200 Subject: [PATCH] Add properties to Finding and Prehistoric --- src/Entity/Finding.php | 32 ++++++++++++++++++++++++++++++++ src/Entity/Prehistoric.php | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/src/Entity/Finding.php b/src/Entity/Finding.php index b4b61b0..99aecae 100644 --- a/src/Entity/Finding.php +++ b/src/Entity/Finding.php @@ -49,6 +49,12 @@ class Finding implements \JsonSerializable #[ORM\Column(length: 40, nullable: true, name: 'misure')] private ?string $measurements = null; + #[ORM\Column(name: 'comune', length: 10, nullable: false)] + private ?string $municipality = null; + + #[ORM\Column(name: 'etichetta', length: 150, nullable: false)] + private ?string $label = null; + private ?float $lat = null; private ?float $lng = null; @@ -207,6 +213,30 @@ class Finding implements \JsonSerializable return $this; } + public function getLabel(): ?string + { + return $this->label; + } + + public function setLabel(?string $label): static + { + $this->label = $label; + + return $this; + } + + public function getMunicipality(): ?string + { + return $this->municipality; + } + + public function setMunicipality(?string $municipality): static + { + $this->municipality = $municipality; + + return $this; + } + public function getLat(): ?float { return $this->lat; @@ -269,6 +299,8 @@ class Finding implements \JsonSerializable 'conservationPlace' => $this->conservationPlace, 'description' => $this->description, 'author' => $this->author, + 'label' => $this->label, + 'municipality' => $this->municipality, 'coordinates' => [$this->lat, $this->lng], 'bibliography' => $this->bibliography, 'images' => $this->images, diff --git a/src/Entity/Prehistoric.php b/src/Entity/Prehistoric.php index 7f43b9d..3645660 100644 --- a/src/Entity/Prehistoric.php +++ b/src/Entity/Prehistoric.php @@ -33,6 +33,12 @@ class Prehistoric implements \JsonSerializable #[ORM\Column(length: 255, nullable: true, name: 'autore_scheda')] private ?string $author = null; + #[ORM\Column(name: 'comune', length: 10, nullable: false)] + private ?string $municipality = null; + + #[ORM\Column(name: 'etichetta', length: 150, nullable: false)] + private ?string $label = null; + private ?float $lat; private ?float $lng; @@ -167,6 +173,30 @@ class Prehistoric implements \JsonSerializable return $this; } + + public function getLabel(): ?string + { + return $this->label; + } + + public function setLabel(?string $label): static + { + $this->label = $label; + + return $this; + } + + public function getMunicipality(): ?string + { + return $this->municipality; + } + + public function setMunicipality(?string $municipality): static + { + $this->municipality = $municipality; + + return $this; + } public function jsonSerialize(): array { @@ -178,6 +208,8 @@ class Prehistoric implements \JsonSerializable 'conservation' => $this->conservation, 'author' => $this->author, 'description' => $this->description, + 'label' => $this->label, + 'municipality' => $this->municipality, 'coordinates' => [$this->lat, $this->lng], 'images' => $this->images, ];