<?php

namespace KupShop\AutomationConfiguratorBundle\Configurator\Interfaces\Triggers;

use KupShop\AutomationConfiguratorBundle\Configurator\Interfaces\Config\TriggerConfig;

interface TriggerInterface
{
    public function getConfig();

    public function getName();

    public function isRunnable(TriggerConfig $triggerConfig, $triggerContext);

    public function modifyPrefetchContext($context, $triggerPrefetchContext);

    public function getLogDescription($triggerContext);

    public function shouldQueriesGoToMaster();

    /**
     * @return int|false|null
     *                        false: no limit
     *                        null: default limit from contextprovider
     *                        int: custom limit
     */
    public function getDbFetchLimit(): int|false|null;

    public function getMaxFilteredObjectsLimit(): int|false|null;
}
