<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mongo-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mongo-mapping                     http://doctrine-project.org/schemas/orm/doctrine-mongo-mapping.xsd">
    <mapped-superclass name="Sonata\ClassificationBundle\Document\BaseCategory">
        <field name="name" type="string" fieldName="name"/>
        <field name="enabled" type="boolean" fieldName="enabled"/>
        <field name="slug" type="string" fieldName="slug"/>
        <field name="description" type="string" fieldName="description"/>
        <field name="createdAt" type="timestamp" fieldName="createdAt"/>
        <field name="updatedAt" type="timestamp" fieldName="updatedAt"/>
        <lifecycle-callbacks>
            <lifecycle-callback type="prePersist" method="prePersist"/>
            <lifecycle-callback type="preUpdate" method="preUpdate"/>
        </lifecycle-callbacks>
    </mapped-superclass>
</doctrine-mongo-mapping>
