<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                                      http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
    <entity name="MyMoneyJar\Domain\Fee" table="mmj_fee">
        <id name="id" type="mmj_uuid">
            <generator strategy="NONE"/>
        </id>

        <field name="userId" type="mmj_uuid"/>
        <field name="correlationId"/>
        <field name="type"/>
        <embedded name="baseAmount" class="Money\Money"/>
        <field name="quantity" type="integer"/>
        <embedded name="flatFee" class="Money\Money"/>
        <field name="percentage" type="integer"/>
        <embedded name="feeRate" class="Money\Money"/>
        <field name="reference"/>
        <field name="chargeAt" type="datetime_immutable"/>
        <field name="chargedAt" type="datetime_immutable" nullable="true"/>
        <field name="createdAt" type="datetime_immutable"/>
    </entity>
</doctrine-mapping>
