<?xml version="1.0" encoding="utf-8"?>
<doctrine-phpcr-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="Sonata\MediaBundle\PHPCR\BaseGallery" referenceable="true" >

        <uuid name="uuid" />

        <children name="galleryHasMedias"/>

        <field name="name"          type="string"/>
        <field name="context"       type="string"/>
        <field name="defaultFormat" type="string" />
        <field name="enabled"       type="boolean"/>

        <field name="updatedAt"     type="date"/>
        <field name="createdAt"     type="date"/>

        <lifecycle-callbacks>
            <lifecycle-callback type="prePersist" method="prePersist" />
            <lifecycle-callback type="preUpdate" method="preUpdate" />
        </lifecycle-callbacks>

    </mapped-superclass>

</doctrine-phpcr-mapping>
