Add properties to Finding and Prehistoric

This commit is contained in:
Nicolò P 2025-06-03 15:34:45 +02:00
parent e402dbe97f
commit 660de08377
2 changed files with 64 additions and 0 deletions

View File

@ -49,6 +49,12 @@ class Finding implements \JsonSerializable
#[ORM\Column(length: 40, nullable: true, name: 'misure')] #[ORM\Column(length: 40, nullable: true, name: 'misure')]
private ?string $measurements = null; 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 $lat = null;
private ?float $lng = null; private ?float $lng = null;
@ -207,6 +213,30 @@ class Finding implements \JsonSerializable
return $this; 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 public function getLat(): ?float
{ {
return $this->lat; return $this->lat;
@ -269,6 +299,8 @@ class Finding implements \JsonSerializable
'conservationPlace' => $this->conservationPlace, 'conservationPlace' => $this->conservationPlace,
'description' => $this->description, 'description' => $this->description,
'author' => $this->author, 'author' => $this->author,
'label' => $this->label,
'municipality' => $this->municipality,
'coordinates' => [$this->lat, $this->lng], 'coordinates' => [$this->lat, $this->lng],
'bibliography' => $this->bibliography, 'bibliography' => $this->bibliography,
'images' => $this->images, 'images' => $this->images,

View File

@ -33,6 +33,12 @@ class Prehistoric implements \JsonSerializable
#[ORM\Column(length: 255, nullable: true, name: 'autore_scheda')] #[ORM\Column(length: 255, nullable: true, name: 'autore_scheda')]
private ?string $author = null; 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 $lat;
private ?float $lng; private ?float $lng;
@ -168,6 +174,30 @@ class Prehistoric implements \JsonSerializable
return $this; 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 public function jsonSerialize(): array
{ {
return [ return [
@ -178,6 +208,8 @@ class Prehistoric implements \JsonSerializable
'conservation' => $this->conservation, 'conservation' => $this->conservation,
'author' => $this->author, 'author' => $this->author,
'description' => $this->description, 'description' => $this->description,
'label' => $this->label,
'municipality' => $this->municipality,
'coordinates' => [$this->lat, $this->lng], 'coordinates' => [$this->lat, $this->lng],
'images' => $this->images, 'images' => $this->images,
]; ];