<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
                        http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">

    <mapped-superclass name="FOS\UserBundle\Model\User" collection="fos_user_user">

        <field name="username" fieldName="username" type="string" />

        <field name="usernameCanonical" fieldName="usernameCanonical" type="string" />

        <field name="email" fieldName="email" type="string" />

        <field name="emailCanonical" fieldName="emailCanonical" type="string" />

        <field name="enabled" fieldName="enabled" type="boolean" />

        <field name="salt" fieldName="salt" type="string" />

        <field name="password" fieldName="password" type="string" />

        <field name="lastLogin" fieldName="lastLogin" type="date" />

        <field name="locked" fieldName="locked" type="boolean" />

        <field name="expired" fieldName="expired" type="boolean" />

        <field name="expiresAt" fieldName="expiresAt" type="date" />

        <field name="confirmationToken" fieldName="confirmationToken" type="string" />

        <field name="passwordRequestedAt" fieldName="passwordRequestedAt" type="date" />

        <field name="roles" fieldName="roles" type="collection" />

        <field name="credentialsExpired" fieldName="credentialsExpired" type="boolean" />

        <field name="credentialsExpireAt" fieldName="credentialsExpireAt" type="date" />
        <indexes>
            <index>
                <key name="usernameCanonical" order="asc" />
                <option name="safe" value="true" />
                <option name="unique" value="true" />
            </index>
            <index>
                <key name="emailCanonical" order="asc" />
                <option name="safe" value="true" />
                <option name="unique" value="true" />
            </index>
        </indexes>

    </mapped-superclass>

</doctrine-mongo-mapping>
