| Numéro du ticket | Titre du ticket | |------------------|-----------------| | #203 | Réceptions — Parcours de pesée multi-étapes | ## Description de la PR [#203] Réceptions — Parcours de pesée multi-étapes ## Modification du .env ## Check list - [x] Pas de régression - [x] TU/TI/TF rédigée - [x] TU/TI/TF OK - [x] CHANGELOG modifié Reviewed-on: #3 Reviewed-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-authored-by: AUTIN Tristan <tristan@yuno.malio.fr> Co-committed-by: AUTIN Tristan <tristan@yuno.malio.fr>
39 lines
898 B
PHP
39 lines
898 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Dto;
|
|
|
|
use DateTimeImmutable;
|
|
use Symfony\Component\Serializer\Attribute\Context;
|
|
use Symfony\Component\Serializer\Attribute\Groups;
|
|
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
|
|
|
|
final readonly class PontBasculeReading
|
|
{
|
|
public function __construct(
|
|
#[Groups(['reception:weigh:read'])]
|
|
private ?int $dsd,
|
|
#[Groups(['reception:weigh:read'])]
|
|
private ?float $weight,
|
|
#[Groups(['reception:weigh:read'])]
|
|
#[Context([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])]
|
|
private ?DateTimeImmutable $weighedAt = null,
|
|
) {}
|
|
|
|
public function getDsd(): ?int
|
|
{
|
|
return $this->dsd;
|
|
}
|
|
|
|
public function getWeight(): ?float
|
|
{
|
|
return $this->weight;
|
|
}
|
|
|
|
public function getWeighedAt(): ?DateTimeImmutable
|
|
{
|
|
return $this->weighedAt;
|
|
}
|
|
}
|