<?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 repository-class="App\Entity\RepasRepository" name="App\Entity\Repas"
            table="repas">
        <id name="id" type="integer" column="id">
            <generator strategy="IDENTITY"/>
        </id>
        <field name="lieuMidi" type="string" column="lieuMidi" nullable="false"/>
        <field name="lieuSoir" type="string" column="lieuSoir" nullable="false"/>
        <field name="cafe" type="boolean" column="cafe" nullable="false"/>
        <field name="alcool" type="boolean" column="alcool" nullable="false"/>
        <field name="vin" type="string" column="vin" nullable="true"/>
        <field name="quantiteVin" type="string" column="quantiteVin" nullable="true"/>
        <field name="troubleDeglutition" type="boolean" column="troubleDeglutition" nullable="false"/>
        <field name="commentaireTroubles" type="text" column="commentaireTroubles" nullable="true"/>
        <field name="dateTroubles" type="datetime" column="dateTroubles" nullable="true"/>
        <field name="dateDebut" type="datetime" column="dateDebut" nullable="true"/>
        <field name="dateFin" type="datetime" column="dateFin" nullable="true"/>
        <field name="texture" type="string" column="texture" nullable="false"/>
        <field name="eau" column="eau" type="string"  nullable="false"/>
        <field name="motifChangement" column="motifChangement" type="string"  nullable="true"/>
        <field name="dateTexture" type="datetime" column="dateTexture" nullable="true"/>
        <field name="allergies" type="boolean" column="allergies" nullable="false"/>
        <field name="commentaireAllergies" type="string" column="commentaireAllergies" length="255" nullable="true"/>
        <field name="autonomies" column="autonomies" type="array" />
        <field name="commentaireAutonomie" type="text" column="commentaireAutonomie" nullable="true"/>
        <field name="gouts" type="string" column="gouts" nullable="true"/>
        <field name="degouts" type="string" column="degouts" nullable="true"/>
        <field name="regimes" column="regimes" type="array" />
        <field name="commentaireRegime" type="text" column="commentaireRegime" nullable="true"/>
        <field name="habitudes" column="habitudes" type="array"/>
        <field name="commentaireHabitude" type="text" column="commentaireHabitude" nullable="true"/>
        <field name="position" type="string" column="position" length="255" nullable="false"/>
        <many-to-one field="structure" target-entity="App\Entity\Structure" fetch="LAZY">
            <join-columns>
                <join-column name="structure_id" referenced-column-name="id" nullable="false"/>
            </join-columns>
        </many-to-one>
        <one-to-one field="occupant" target-entity="Occupant" inversed-by="repas">
            <join-column name="occupant_id" referenced-column-name="id" on-delete="CASCADE" nullable="false"/>
        </one-to-one>
    </entity>
</doctrine-mapping>
