<?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) Sylius Sp. z o.o.

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping">
    <mapped-superclass name="Sylius\Component\Promotion\Model\CatalogPromotionScope" table="sylius_catalog_promotion_scope">
        <id name="id" type="integer">
            <generator strategy="AUTO" />
        </id>

        <field name="type" />
        <field name="configuration" type="json">
            <options>
                <option name="jsonb">true</option>
            </options>
        </field>

        <many-to-one field="catalogPromotion" target-entity="Sylius\Component\Promotion\Model\CatalogPromotionInterface" inversed-by="scopes">
            <join-column name="promotion_id" referenced-column-name="id" nullable="true" />
        </many-to-one>
    </mapped-superclass>
</doctrine-mapping>
