Feat: Refactoring Shipping DataTransferObjects to DTOs namespace

This commit is contained in:
2026-09-03 15:58:51 +03:00
parent a1301d4b46
commit 0fa2188146
12 changed files with 16 additions and 16 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Modules\Core\Shipping\DTOs;
use Illuminate\Support\Collection;
class ManifestResult
{
private function __construct(
public readonly bool $success,
public readonly ?string $reference,
public readonly Collection $includedShipments,
public readonly Collection $blockedShipments,
public readonly ?string $reason,
) {}
public static function success(string $reference, Collection $includedShipments): self
{
return new self(true, $reference, $includedShipments, collect(), null);
}
public static function blocked(Collection $blockedShipments, string $reason): self
{
return new self(false, null, collect(), $blockedShipments, $reason);
}
}