ldc-boutique-cnc-sable/domain/Models/ValueObjects/AttachedFile.php
2026-10-27 09:58:12 +01:00

24 lines
603 B
PHP

<?php
declare(strict_types=1);
namespace Domain\Models\ValueObjects;
final readonly class AttachedFile
{
public function __construct(
public string $path,
public string $originalName,
public string $mimeType
) {
if (trim($path) === '') {
throw new \DomainException('path cannot be empty');
}
if (trim($originalName) === '') {
throw new \DomainException('originalName cannot be empty');
}
if (trim($mimeType) === '') {
throw new \DomainException('mimeType cannot be empty');
}
}
}