27 lines
620 B
PHP
27 lines
620 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Inventory\Application\Contracts;
|
|
|
|
use App\Modules\Inventory\Domain\Exceptions\InvalidStockImage;
|
|
|
|
/**
|
|
* Keeps the image files of stock items, which help recognise them on a
|
|
* touch screen: an upright JPEG without metadata and its thumbnail.
|
|
*/
|
|
interface StockItemImages
|
|
{
|
|
/**
|
|
* @return array{path: string, thumbnailPath: string}
|
|
*
|
|
* @throws InvalidStockImage
|
|
*/
|
|
public function store(string $uploadedFilePath, int $itemId): array;
|
|
|
|
/**
|
|
* @param list<string> $paths
|
|
*/
|
|
public function delete(array $paths): void;
|
|
}
|