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

        <field name="firstName" length="255" nullable="true"/>
        <field name="lastName" length="255" nullable="true"/>
        <field name="dateOfBirth" type="datetime_immutable" nullable="true"/>
        <field name="topUpDay" type="smallint" nullable="true"/>
        <field name="countryOfBirth" length="2" nullable="true"/>
        <field name="currency" length="3" nullable="true"/>
        <field name="registeredAt" type="datetime_immutable"/>
        <field name="addressVerifiedAt" type="datetime_immutable" nullable="true"/>
        <field name="verification" type="mmj_user_verification" nullable="true"/>
        <field name="letMeKnow" type="mmj_user_let_me_know" nullable="true"/>
        <field name="isCorporate" type="boolean">
            <options>
                <option name="default">0</option>
            </options>
        </field>
        <field name="personalityQuizResult" type="json" nullable="true">
            <options>
                <option name="jsonb">true</option>
            </options>
        </field>
        <field name="wellbeingQuizResult" type="json" nullable="true">
            <options>
                <option name="jsonb">true</option>
            </options>
        </field>
        <field name="bootGuardCode" length="255" nullable="true"/>
        <field name="suspendedAt" type="datetime_immutable" nullable="true"/>
        <field name="hiddenAt" type="datetime_immutable" nullable="true"/>
        <field name="deletedAt" type="datetime_immutable" nullable="true"/>
        <field name="isPrivate" type="boolean">
            <options>
                <option name="default">0</option>
            </options>
        </field>
        <field name="matches" type="json_array" nullable="true">
            <options>
                <option name="jsonb">true</option>
            </options>
        </field>
        <field name="wageAccess" type="boolean">
            <options>
                <option name="default">0</option>
            </options>
        </field>
        <field name="payboostAccess" type="boolean">
            <options>
                <option name="default">0</option>
            </options>
        </field>
        <field name="aispStatus" type="json" nullable="true">
            <options>
                <option name="jsonb">true</option>
            </options>
        </field>
        <field name="onboardingCompletedAt" type="datetime_immutable" nullable="true"/>
        <field name="isPayboostOnly" type="boolean"/>
            <options>
                <option name="default">0</option>
            </options>
        <field name="payboostOnlyOnboarded" type="boolean"/>
            <options>
                <option name="default">0</option>
            </options>
        <field name="earlyWageAccessAcceptedAt" type="datetime_immutable" nullable="true"/>
        <field name="payboostAccessAcceptedAt" type="datetime_immutable" nullable="true"/>
        <field name="notificationOnboardingCompletedAt" type="datetime_immutable" nullable="true"/>

        <embedded name="email" class="MyMoneyJar\Domain\Email" use-column-prefix="false"/>
        <embedded name="phoneNumber" class="MyMoneyJar\Domain\PhoneNumber" use-column-prefix="false"/>
        <embedded
                name="bankAccountIdentifier"
                class="MyMoneyJar\Domain\User\BankAccountIdentifier"
                use-column-prefix="false"
        />
        <embedded name="address" class="MyMoneyJar\Domain\Address"/>
        <field name="installations" type="mmj_user_installations" nullable="true"/>
        <field name="risks" type="json" nullable="true">
            <options>
                <option name="jsonb">true</option>
            </options>
        </field>
    </entity>
</doctrine-mapping>
