Add Symfony payload mapping, fixtures, and QA tooling

This commit is contained in:
Bernard Ngandu
2025-10-10 08:48:27 +02:00
parent 16a8af3507
commit 49d93ffc63
48 changed files with 7456 additions and 208 deletions
+87
View File
@@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\SignalRepository;
use DateTimeImmutable;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: SignalRepository::class)]
#[ORM\Table(name: 'signals')]
#[ORM\Index(columns: ['created_at'], name: 'idx_signals_created_at')]
#[ORM\Index(columns: ['user_key'], name: 'idx_signals_user_key')]
class Signal
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: Types::INTEGER)]
private ?int $id = null; // @phpstan-ignore property.unusedType
#[ORM\Column(type: Types::STRING, length: 64)]
private string $userKey;
#[ORM\Column(type: Types::FLOAT)]
private float $lat;
#[ORM\Column(type: Types::FLOAT)]
private float $lng;
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, name: 'created_at')]
private DateTimeImmutable $createdAt;
public function getId(): ?int
{
return $this->id;
}
public function getUserKey(): string
{
return $this->userKey;
}
public function setUserKey(string $userKey): self
{
$this->userKey = $userKey;
return $this;
}
public function getLat(): float
{
return $this->lat;
}
public function setLat(float $lat): self
{
$this->lat = $lat;
return $this;
}
public function getLng(): float
{
return $this->lng;
}
public function setLng(float $lng): self
{
$this->lng = $lng;
return $this;
}
public function getCreatedAt(): DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
}