<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Visual Merchandiser for Magento 2
 */-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Mview/etc/mview.xsd">
    <view id="amasty_merch_product_dynamic_category"
          class="Amasty\VisualMerch\Model\Indexer\DynamicCategory\ProductIndexer"
          group="indexer">
        <subscriptions>
            <table name="catalog_product_entity" entity_column="entity_id"/>
            <table name="catalog_product_entity_datetime" entity_column="entity_id"/>
            <table name="catalog_product_entity_decimal" entity_column="entity_id"/>
            <table name="catalog_product_entity_int" entity_column="entity_id"/>
            <table name="catalog_product_entity_text" entity_column="entity_id"/>
            <table name="catalog_product_entity_tier_price" entity_column="entity_id"/>
            <table name="catalog_product_entity_varchar" entity_column="entity_id"/>
            <table name="catalog_category_product" entity_column="product_id"/>
        </subscriptions>
    </view>
    <view id="amasty_merch_dynamic_category_product"
          class="Amasty\VisualMerch\Model\Indexer\DynamicCategory\CategoryIndexer"
          group="indexer">
        <subscriptions>
            <table name="catalog_category_entity_text" entity_column="entity_id"/>
            <table name="catalog_category_product_static" entity_column="category_id"/>
        </subscriptions>
    </view>
    <view id="amasty_merch_product_dynamic_category_msi"
          class="Amasty\VisualMerch\Model\Indexer\DynamicCategory\MsiProductIndexer"
          group="indexer">
        <subscriptions>
            <table name="inventory_source_item"
                   entity_column="source_item_id"
                   subscription_model="Amasty\VisualMerch\Model\Mview\View\ExistingSubscription"/>
        </subscriptions>
    </view>
</config>
