<?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" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
    <mapped-superclass name="Sylius\Component\Attribute\Model\Attribute" table="sylius_attribute">
        <id name="id" column="id" type="integer">
            <generator strategy="AUTO" />
        </id>

        <field name="code" column="code" type="string" unique="true" />
        <field name="type" column="type" type="string" />
        <field name="storageType" column="storage_type" type="string" />
        <field name="configuration" column="configuration" type="json">
            <options>
                <option name="jsonb">true</option>
            </options>
        </field>

        <field name="createdAt" column="created_at" type="datetime">
            <gedmo:timestampable on="create"/>
        </field>
        <field name="updatedAt" column="updated_at" type="datetime" nullable="true">
            <gedmo:timestampable on="update"/>
        </field>

        <field name="position" type="integer">
            <gedmo:sortable-position />
        </field>

        <field name="translatable" column="translatable" type="boolean">
            <options>
                <option name="default">1</option>
            </options>
        </field>
    </mapped-superclass>
</doctrine-mapping>
