ekart/backend/app/Data/ProductImageDTO.php
kusowl 684b7585bb feature: product creation and image upload
create image upload endpoint
create product creation endpoint
create get product categories endpoint
2026-02-26 19:03:41 +05:30

27 lines
541 B
PHP

<?php
namespace App\Data;
use App\Contracts\OutputDataTransferObject;
final readonly class ProductImageDTO implements OutputDataTransferObject
{
public function __construct(
public ?int $id = null,
public ?string $path = null,
public ?int $productId = null,
) {}
/**
* @return array<string, mixed>
*/
public function toArray(): array
{
return [
'id' => $this->id,
'path' => $this->path,
'productId' => $this->productId,
];
}
}