feat: Reimplement order and invoice management with new service and repository layers, introduce compression middleware, and update database schema.

This commit is contained in:
pbao9
2026-03-12 09:30:29 +07:00
parent 7f6264c87f
commit 1e09ccf17b
87 changed files with 2348 additions and 2612 deletions
@@ -2,11 +2,20 @@
namespace App\Repositories\Api\Invoice;
use App\Models\Invoice;
use App\Models\Order;
use App\Repositories\BaseRepositoryInterface;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
interface InvoiceRepositoryInterface extends BaseRepositoryInterface
{
public function getInvoice(int $limit = 10, $customer = null);
/**
* Paginated invoice list for a customer.
*/
public function getInvoice(int $limit, int $customerId): LengthAwarePaginator;
public function createFromOrder($order);
/**
* Create an invoice (+ invoice_items) from a completed Order.
*/
public function createFromOrder(Order $order): Invoice;
}