<?php
/**
 * Recovery Email Query Class.
 *
 * @package     EDD\Pro\CartRecovery\Database\Queries
 * © 2025 Easy Digital Downloads, LLC
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       3.6.5
 */

namespace EDD\Pro\CartRecovery\Database\Queries;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

use EDD\Database\Query;

/**
 * Class used for querying recovery emails.
 *
 * @since 3.6.5
 *
 * @see \EDD\Pro\CartRecovery\Database\Queries\RecoveryEmail::__construct() for accepted arguments.
 */
class RecoveryEmail extends Query {

	/** Table Properties ******************************************************/

	/**
	 * Name of the database table to query.
	 *
	 * @var string
	 */
	protected $table_name = 'acr_emails';

	/**
	 * String used to alias the database table in MySQL statement.
	 *
	 * @var string
	 */
	protected $table_alias = 're';

	/**
	 * Name of class used to setup the database schema
	 *
	 * @var string
	 */
	protected $table_schema = '\\EDD\\Pro\\CartRecovery\\Database\\Schemas\\RecoveryEmails';

	/** Item ******************************************************************/

	/**
	 * Name for a single item
	 *
	 * @var string
	 */
	protected $item_name = 'recovery_email';

	/**
	 * Plural version for a group of items.
	 *
	 * @var string
	 */
	protected $item_name_plural = 'recovery_emails';

	/**
	 * Callback function for turning IDs into objects
	 *
	 * @var mixed
	 */
	protected $item_shape = '\\EDD\\Pro\\CartRecovery\\Emails\\Email';

	/** Cache *****************************************************************/

	/**
	 * Group to cache queries and queried items in.
	 *
	 * @var string
	 */
	protected $cache_group = 'acr_emails';
}
