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

        <field name="requester" type="mmj_uuid"/>
        <field name="requestee" type="mmj_uuid" nullable="true"/>
        <field name="requestees" type="mmj_payment_request_requestees">
            <options>
                <option name="default">[]</option>
            </options>
        </field>
        <field name="reference" length="255"/>
        <field name="requestedAt" type="datetime_immutable"/>
        <field name="acceptedAt" type="datetime_immutable" nullable="true"/>
        <field name="rejectedAt" type="datetime_immutable" nullable="true"/>
        <field name="cancelledAt" type="datetime_immutable" nullable="true"/>

        <embedded name="amount" class="Money\Money"/>
    </entity>
</doctrine-mapping>
