feat: Reimplement order and invoice management with new service and repository layers, introduce compression middleware, and update database schema.
This commit is contained in:
@@ -2,15 +2,31 @@
|
||||
|
||||
namespace App\Repositories\Api\Order;
|
||||
|
||||
use App\Models\Order;
|
||||
use App\Models\OrderItem;
|
||||
use App\Repositories\BaseRepositoryInterface;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
|
||||
interface OrderRepositoryInterface extends BaseRepositoryInterface
|
||||
{
|
||||
public function createItem($orderId, array $data);
|
||||
/**
|
||||
* Create an order item for the given order.
|
||||
* Addon selections are serialised into addons_meta JSON.
|
||||
*/
|
||||
public function createItem(int $orderId, array $data): OrderItem;
|
||||
|
||||
public function processPayment($order, $method);
|
||||
/**
|
||||
* Mark order as completed, update the related invoice as paid.
|
||||
*/
|
||||
public function processPayment(Order $order, string $method): Order;
|
||||
|
||||
public function hasPendingOrder($customerId);
|
||||
/**
|
||||
* Return true if the customer has any pending orders.
|
||||
*/
|
||||
public function hasPendingOrder(int $customerId): bool;
|
||||
|
||||
public function getOrders($customerId, array $filters);
|
||||
/**
|
||||
* Paginated order list for a customer, with optional filters.
|
||||
*/
|
||||
public function getOrders(int $customerId, array $filters): LengthAwarePaginator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user