<?php
/**
 * Model Interface
 *
 * @category   WordPress_Plugin
 * @package    Common
 * @subpackage Interfaces
 * @author     miniOrange <info@miniorange.com>
 * @license    MIT/Expat
 * @link       https://plugins.miniorange.com/woocommerce-api-product-sync-with-woocommerce-rest-apis
 */

namespace MOWCPS\Common\Interfaces;

if ( ! defined( 'ABSPATH' ) ) {
	die;
}

/**
 * Interface Model_Interface
 *
 * Defines the contract for data operations
 */
interface Model_Interface {
	/**
	 * Get all records
	 *
	 * @param array $args Optional. Arguments to filter the results.
	 * @return array List of records
	 */
	public static function get_all( $args = array() );

	/**
	 * Get record by UUID
	 *
	 * @param string $uuid The record UUID.
	 * @return array|null Record data or null if not found
	 */
	public static function get_by_uuid( $uuid );

	/**
	 * Create new record
	 *
	 * @param array $data The record data.
	 * @return array|WP_Error Created record data or error
	 */
	public static function create( $data );

	/**
	 * Update record
	 *
	 * @param string $uuid The record UUID.
	 * @param array  $data The record data.
	 * @return array|WP_Error Updated record data or error
	 */
	public static function update( $uuid, $data );

	/**
	 * Delete record
	 *
	 * @param string $uuid The record UUID.
	 * @return bool|WP_Error True on success, WP_Error on failure
	 */
	public static function delete( $uuid );
}
