Make quick sale products on machines as orders paid when ready
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Sales\Domain\Contracts;
|
||||
|
||||
use App\Modules\Sales\Domain\Entities\QuickSaleOrder;
|
||||
use DateTimeImmutable;
|
||||
|
||||
interface QuickSaleOrderRepository
|
||||
{
|
||||
/**
|
||||
* The order, locked until the end of the transaction.
|
||||
*/
|
||||
public function lockById(int $id): ?QuickSaleOrder;
|
||||
|
||||
/**
|
||||
* The order a line belongs to, locked until the end of the transaction.
|
||||
*/
|
||||
public function lockByLineId(int $lineId): ?QuickSaleOrder;
|
||||
|
||||
/**
|
||||
* The day's next pickup number, starting from 1 each day. The day's
|
||||
* orders are locked so that two orders never get the same number.
|
||||
*/
|
||||
public function nextPickupNumber(DateTimeImmutable $day): int;
|
||||
|
||||
/**
|
||||
* Inserts or updates the order and its lines; returns the stored order.
|
||||
*/
|
||||
public function save(QuickSaleOrder $order): QuickSaleOrder;
|
||||
}
|
||||
Reference in New Issue
Block a user