[frontend] restructure components

This commit is contained in:
2025-10-12 05:06:13 +02:00
parent 01b84042ab
commit 9b20b08ab2
24 changed files with 830 additions and 248 deletions
+12
View File
@@ -14,6 +14,18 @@ services:
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
adminer:
image: adminer:latest
depends_on:
- postgres
environment:
APP_ENV: dev
ADMINER_DESIGN: pepa-linha
ADMINER_DEFAULT_SERVER: postgres
ports:
- "8082:8080"
###> symfony/mercure-bundle ###
mercure:
image: dunglas/mercure
+2
View File
@@ -7,6 +7,8 @@ doctrine:
use_savepoints: true
mapping_types:
geography: string
types:
App\Doctrine\Type\SignalIdType: App\Doctrine\Type\SignalIdType
orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Doctrine\Type;
use App\Entity\Identifier\SignalId;
use Symfony\Bridge\Doctrine\Types\AbstractUidType;
final class SignalIdType extends AbstractUidType
{
public function getName(): string
{
return self::class;
}
protected function getUidClass(): string
{
return SignalId::class;
}
}
+2 -1
View File
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Entity;
use App\Doctrine\Type\SignalIdType;
use App\Entity\Identifier\SignalId;
use App\Repository\SignalRepository;
use App\ValueObject\Point;
@@ -20,7 +21,7 @@ readonly class Signal
#[ORM\Column(type: Types::STRING, length: 64)] public string $userKey,
#[ORM\Embedded(class: Point::class, columnPrefix: 'user_')] public Point $userLocation,
#[ORM\Embedded(class: Point::class, columnPrefix: 'signal_')] public Point $signalLocation,
#[ORM\Id] #[ORM\GeneratedValue(strategy: 'NONE')] #[ORM\Column(type: 'uuid')] public SignalId $id = new SignalId(),
#[ORM\Id] #[ORM\GeneratedValue(strategy: 'NONE')] #[ORM\Column(type: SignalIdType::class)] public SignalId $id = new SignalId(),
#[ORM\Column(name: 'created_at', type: Types::DATETIME_IMMUTABLE)] public \DateTimeImmutable $createdAt = new \DateTimeImmutable()
) {
}