22 lines
491 B
PHP
22 lines
491 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Inventory\Domain\Contracts;
|
|
|
|
use App\Modules\Inventory\Domain\Entities\StockMovement;
|
|
|
|
interface StockMovementRepository
|
|
{
|
|
public function add(StockMovement $movement): StockMovement;
|
|
|
|
public function findById(int $id): ?StockMovement;
|
|
|
|
public function isReversed(int $movementId): bool;
|
|
|
|
/**
|
|
* The item's balance in thousandths: the sum of its movements.
|
|
*/
|
|
public function balanceOf(int $itemId): int;
|
|
}
|