follow up graphs
This commit is contained in:
parent
4b4a46c3f7
commit
ab1b9a9d3d
11 changed files with 580 additions and 41 deletions
|
@ -98,8 +98,11 @@ class Stats
|
|||
#[ORM\Column(type: Types::DECIMAL, precision: 15, scale: 2, nullable: true)]
|
||||
private ?string $budget_annuel = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'stats')]
|
||||
private ?CityFollowUp $cityFollowUps = null;
|
||||
/**
|
||||
* @var Collection<int, CityFollowUp>
|
||||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'stats', targetEntity: CityFollowUp::class, cascade: ['persist', 'remove'])]
|
||||
private Collection $cityFollowUps;
|
||||
|
||||
public function getCTCurlBase(): ?string
|
||||
{
|
||||
|
@ -251,6 +254,7 @@ class Stats
|
|||
{
|
||||
$this->places = new ArrayCollection();
|
||||
$this->statsHistories = new ArrayCollection();
|
||||
$this->cityFollowUps = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
|
@ -569,15 +573,30 @@ class Stats
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getCityFollowUps(): ?CityFollowUp
|
||||
/**
|
||||
* @return Collection<int, CityFollowUp>
|
||||
*/
|
||||
public function getCityFollowUps(): Collection
|
||||
{
|
||||
return $this->cityFollowUps;
|
||||
}
|
||||
|
||||
public function setCityFollowUps(?CityFollowUp $cityFollowUps): static
|
||||
public function addCityFollowUp(CityFollowUp $cityFollowUp): static
|
||||
{
|
||||
$this->cityFollowUps = $cityFollowUps;
|
||||
if (!$this->cityFollowUps->contains($cityFollowUp)) {
|
||||
$this->cityFollowUps->add($cityFollowUp);
|
||||
$cityFollowUp->setStats($this);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeCityFollowUp(CityFollowUp $cityFollowUp): static
|
||||
{
|
||||
if ($this->cityFollowUps->removeElement($cityFollowUp)) {
|
||||
if ($cityFollowUp->getStats() === $this) {
|
||||
$cityFollowUp->setStats(null);
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue