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

namespace EasyInvoice\Interfaces;

/**
 * Repository Interface
 * 
 * Defines the contract for repository classes.
 */
interface RepositoryInterface {
    /**
     * Find a model by ID
     *
     * @param int $id The ID to find
     * @return mixed The model or null if not found
     */
    public function find($id);

    /**
     * Get all models
     *
     * @param array $args Optional arguments to filter the results
     * @return array Array of models
     */
    public function all($args = []);

    /**
     * Create a new model
     *
     * @param array $data The data to create the model with
     * @return mixed The created model
     */
    public function create($data);

    /**
     * Update an existing model
     *
     * @param int $id The ID of the model to update
     * @param array $data The data to update the model with
     * @return mixed The updated model
     */
    public function update($id, $data);

    /**
     * Delete a model
     *
     * @param int $id The ID of the model to delete
     * @return bool True if successful, false otherwise
     */
    public function delete($id);

    /**
     * Count models
     *
     * @param array $args Optional arguments to filter the results
     * @return int The count of models
     */
    public function count($args = []);
} 