# This file is part of the Sylius package.
# (c) Sylius Sp. z o.o.

sylius_promotion:
    resources:
        catalog_promotion:
            classes:
                model: Sylius\Component\Core\Model\CatalogPromotion
        catalog_promotion_scope:
            classes:
                model: Sylius\Component\Core\Model\CatalogPromotionScope
        promotion_subject:
            classes:
                model: "%sylius.model.order.class%"
        promotion:
            classes:
                model: Sylius\Component\Core\Model\Promotion
                repository: Sylius\Bundle\CoreBundle\Doctrine\ORM\PromotionRepository
        promotion_coupon:
            classes:
                model: Sylius\Component\Core\Model\PromotionCoupon
                repository: Sylius\Bundle\PromotionBundle\Doctrine\ORM\PromotionCouponRepository

    catalog_promotion_action:
        validation_groups:
            fixed_discount:
                - 'sylius'
                - 'sylius_catalog_promotion_action_fixed_discount'

    catalog_promotion_scope:
        validation_groups:
            for_products:
                - 'sylius'
                - 'sylius_catalog_promotion_scope_for_products'
            for_variants:
                - 'sylius'
                - 'sylius_catalog_promotion_scope_for_variants'
            for_taxons:
                - 'sylius'
                - 'sylius_catalog_promotion_scope_for_taxons'

    promotion_action:
        validation_groups:
            order_percentage_discount:
                - 'sylius'
                - 'sylius_promotion_action_order_percentage_discount'
            shipping_percentage_discount:
                - 'sylius'
                - 'sylius_promotion_action_shipping_percentage_discount'
            order_fixed_discount:
                - 'sylius'
                - 'sylius_promotion_action_order_fixed_discount'
            unit_fixed_discount:
                - 'sylius'
                - 'sylius_promotion_action_unit_fixed_discount'
            unit_percentage_discount:
                - 'sylius'
                - 'sylius_promotion_action_unit_percentage_discount'

    promotion_rule:
        validation_groups:
            customer_group:
                - 'sylius'
                - 'sylius_promotion_rule_customer_group'
            nth_order:
                - 'sylius'
                - 'sylius_promotion_rule_nth_order'
            shipping_country:
                - 'sylius'
                - 'sylius_promotion_rule_shipping_country'
            has_taxon:
                - 'sylius'
                - 'sylius_promotion_rule_has_taxon'
            total_of_items_from_taxon:
                - 'sylius'
                - 'sylius_promotion_rule_total_of_items_from_taxon'
            contains_product:
                - 'sylius'
                - 'sylius_promotion_rule_contains_product'
