<?php

namespace App\Repositories\Interfaces;

use App\Models\Order;
use Illuminate\Database\Eloquent\Collection;

interface OrderRepositoryInterface extends RepositoryInterface
{
    /**
     * Get orders by status.
     */
    public function getByStatus(string $status): Collection;

    /**
     * Get orders by customer.
     */
    public function getByCustomer(int $customerId): Collection;

    /**
     * Get orders by type (BUY/SELL).
     */
    public function getByType(string $type): self;

    /**
     * Get draft orders.
     */
    public function getDrafts(): Collection;

    /**
     * Get confirmed orders.
     */
    public function getConfirmed(): Collection;

    /**
     * Filter by date range.
     */
    public function orderDateBetween(string $from, string $to): self;

    /**
     * Find order by order number.
     */
    public function findByOrderNumber(string $orderNumber): ?Order;

    /**
     * Get orders with customer and lines.
     */
    public function withDetails(): self;
}
