Add stock items, groups and movements at a moving average cost

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-26 16:18:59 +02:00
co-authored by Claude Sonnet 5.5
parent 361a2974cf
commit 30132deb0e
81 changed files with 4968 additions and 115 deletions
@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace App\Modules\Inventory\Domain\Contracts;
use App\Modules\Inventory\Domain\Entities\StockItem;
interface StockItemRepository
{
public function findById(int $id): ?StockItem;
/**
* The item, locked until the end of the transaction, so that its
* balance and average cost change one movement at a time.
*/
public function lockById(int $id): ?StockItem;
public function save(StockItem $item): StockItem;
public function isNameTaken(string $name, ?int $exceptId = null): bool;
}