up infos habitants sur stats

This commit is contained in:
Tykayn 2025-06-17 16:23:29 +02:00 committed by tykayn
parent 21d4d5b850
commit 918527e15e
16 changed files with 559 additions and 240 deletions

View file

@ -55,6 +55,10 @@ class Stats
#[ORM\Column(length: 255, nullable: true)]
private ?string $name = null;
// nombre d'habitants dans la zone
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $population = null;
// calcule le pourcentage de complétion de la zone
public function computeCompletionPercent(): ?int
{
@ -255,6 +259,17 @@ class Stats
return $this;
}
public function getPopulation(): ?int
{
return $this->population;
}
public function setPopulation(?int $population): static
{
$this->population = $population;
return $this;
}
}