<?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\ContratMaterielRepository" name="App\Entity\ContratMateriel">
    <id name="id" type="integer" column="id">
      <generator strategy="AUTO"/>
    </id>
    <field name="nom" type="string" column="nom" length="255"/>
    <field name="description" type="text" nullable="true" column="description"/>
    <field name="dureeEnJour" type="integer" column="dureeEnJour"/>
    <field name="dateDebut" type="datetime" column="dateDebut"/>
    <field name="dateFin" type="datetime" column="dateFin"/>
    <field name="type" type="string" column="type"/>
    <field name="informationsProlongation" type="string" column="informationsProlongation" length="255" nullable="true"/>
    <field name="dureeProlongationEnJour" type="integer" column="dureeProlongationEnJour" nullable="true"/>
    <field name="datePreavis" type="datetime" column="datePreavis"/>
    <many-to-one field="prestataire" target-entity="PrestataireMateriel">
        <join-columns>
            <join-column name="prestataire_id" referenced-column-name="id" nullable="false" />
        </join-columns>
    </many-to-one>
    <one-to-many field="materiels" target-entity="App\Entity\Materiel" mapped-by="contrat">
    </one-to-many>
    <many-to-one field="structure" target-entity="Structure">
        <join-columns>
            <join-column name="structure_id" referenced-column-name="id" nullable="false" />
        </join-columns>
    </many-to-one>
  </entity>
</doctrine-mapping>
