add loggers actions

This commit is contained in:
Tykayn 2025-06-26 23:14:22 +02:00 committed by tykayn
parent 59398d14ba
commit 12d4db370f
22 changed files with 517 additions and 218 deletions

91
src/Entity/ActionLog.php Normal file
View file

@ -0,0 +1,91 @@
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
class ActionLog
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', length: 100)]
private ?string $type = null;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $data = null;
#[ORM\Column(type: 'datetime')]
private ?\DateTimeInterface $createdAt = null;
#[ORM\Column(length: 500, nullable: true)]
private ?string $from_url = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $who = null;
public function getId(): ?int
{
return $this->id;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getData(): ?array
{
return $this->data;
}
public function setData(?array $data): self
{
$this->data = $data;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getFromUrl(): ?string
{
return $this->from_url;
}
public function setFromUrl(?string $from_url): static
{
$this->from_url = $from_url;
return $this;
}
public function getWho(): ?string
{
return $this->who;
}
public function setWho(?string $who): static
{
$this->who = $who;
return $this;
}
}

View file

@ -196,7 +196,9 @@ class Stats
$this->avec_site = 0;
$this->avec_accessibilite = 0;
$this->avec_note = 0;
$this->avec_siret = 0;
$this->avec_name = 0;
$somme_completions = 0;
@ -219,10 +221,13 @@ class Stats
$this->avec_horaires++;
$place_completions++;
}
if($place->hasNote()) {
$this->avec_note++;
if($place->getSiret()) {
$this->avec_siret++;
}
$somme_completions += $place_completions / 5;
if($place->getName()) {
$this->avec_name++;
}
$somme_completions += $place_completions / 6;
}
$this->setPlacesCount($places_count);