<?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\Account" table="mmj_account">
        <id name="id" type="mmj_uuid">
            <generator strategy="NONE"/>
        </id>

        <field name="iban" length="255"/>
        <field name="bic" length="255"/>
        <field name="transactions" type="mmj_account_transactions"/>
        <field name="autoPayments" type="mmj_account_auto_payments" nullable="true"/>
        <field name="createdAt" type="datetime_immutable"/>
        <field name="closedAt" type="datetime_immutable" nullable="true"/>

        <embedded name="balance" class="Money\Money"/>
        <embedded
            name="bankAccountIdentifier"
            class="MyMoneyJar\Domain\User\BankAccountIdentifier"
            use-column-prefix="false"
        />
    </entity>
</doctrine-mapping>
