<?php
/**
 * Client Repository Interface
 *
 * @package Easy_Invoice
 * @subpackage Interfaces
 */

namespace EasyInvoice\Interfaces;

use EasyInvoice\Models\Client;

/**
 * ClientRepositoryInterface Interface
 * 
 * Defines the contract for client repositories.
 */
interface ClientRepositoryInterface {
    /**
     * Find a client by ID
     *
     * @param int $id The client ID
     * @return Client|null The client model or null if not found
     */
    public function find($id);
    
    /**
     * Get all clients
     *
     * @param array $args Optional arguments to filter the results
     * @return array Array of Client models
     */
    public function all($args = []);
    
    /**
     * Create a new client
     *
     * @param array $data The client data
     * @return Client The created client model
     */
    public function create($data);
    
    /**
     * Update an existing client
     *
     * @param int $id The client ID
     * @param array $data The client data
     * @return Client|null The updated client model or null if not found
     */
    public function update($id, $data);
    
    /**
     * Delete a client
     *
     * @param int $id The client ID
     * @return bool True if successful, false otherwise
     */
    public function delete($id);
    
    /**
     * Find clients by email
     *
     * @param string $email The client email
     * @return array Array of Client models
     */
    public function findByEmail($email);
    
    /**
     * Find clients by company name
     *
     * @param string $business_client_name The company name
     * @return array Array of Client models
     */
    public function findByBusinessClientName($business_client_name);
    
    /**
     * Search clients by name, email, or company
     *
     * @param string $query The search query
     * @return array Array of Client models
     */
    public function search($query);
} 