Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | #271 | Créer une nouvelle expédition (étape 1) | ## Description de la PR ## Modification du .env ## Check list [x ] Pas de régression TU/TI/TF rédigée [x ] TU/TI/TF OK [x ] CHANGELOG modifié Co-authored-by: kevin <kevin@yuno.malio.fr> Reviewed-on: #12 Reviewed-by: Autin <tristan@yuno.malio.fr> Co-authored-by: Matteo <matteo@yuno.malio.fr> Co-committed-by: Matteo <matteo@yuno.malio.fr>
39 lines
967 B
PHP
39 lines
967 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', 'shipment:weigh:read'])]
|
|
private ?int $dsd,
|
|
#[Groups(['reception:weigh:read', 'shipment:weigh:read'])]
|
|
private ?float $weight,
|
|
#[Groups(['reception:weigh:read', 'shipment: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;
|
|
}
|
|
}
|