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

        <field name="merchantId" type="mmj_uuid"/>
        <field name="categories" type="mmj_categories"/>
        <field name="title" type="string" length="255"/>
        <field name="description" type="text"/>
        <field name="details" type="text"/>
        <field name="dateFrom" type="datetime_immutable" nullable="true"/>
        <field name="dateTo" type="datetime_immutable" nullable="true"/>
        <field name="timeFrom" type="integer" nullable="true"/>
        <field name="timeTo" type="integer" nullable="true"/>
        <field name="weekdays" type="array"/>
        <field name="location" type="mmj_location" nullable="true"/>
        <field name="vouchers" type="mmj_vouchers" nullable="false"/>
        <field name="createdAt" type="datetime_immutable"/>

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