<?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-mongo-mapping xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
                xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
                                    http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">

    <mapped-superclass name="Sylius\Component\Currency\Model\Currency" collection="sylius_currency">
        <field name="id" id="true" strategy="AUTO" />

        <field fieldName="code" name="code" type="string" length="3" />

        <field fieldName="createdAt" name="createdAt" type="date">
            <gedmo:timestampable on="create"/>
        </field>
        <field fieldName="updatedAt" name="updatedAt" type="date">
            <gedmo:timestampable on="update"/>
        </field>

    </mapped-superclass>
</doctrine-mongo-mapping>
