ldc-boutique-cnc-sable/app/Dto/ShopPickupExceptionPivotDto.php

32 lines
706 B
PHP

<?php
declare(strict_types=1);
namespace App\Dto;
use Carbon\CarbonInterface;
use Illuminate\Contracts\Support\Arrayable;
/**
* @implements Arrayable<string, mixed>
*/
final readonly class ShopPickupExceptionPivotDto implements Arrayable
{
public function __construct(
public ?CarbonInterface $replacement_date,
public ?CarbonInterface $order_deadline_at,
) {
}
/**
* @return array<string, mixed>
*/
#[\Override]
public function toArray(): array
{
return [
'replacement_date' => $this->replacement_date?->toIso8601String(),
'order_deadline_at' => $this->order_deadline_at?->toIso8601String(),
];
}
}