<?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 https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity name="Rapsys\AirBundle\Entity\Country" table="countries">
    <id name="id" type="integer">
      <generator strategy="AUTO" />
      <options>
        <option name="unsigned">true</option>
      </options>
    </id>
    <field name="code" type="string" length="2" nullable="false" />
    <field name="alpha" type="string" length="3" nullable="false" />
    <field name="title" type="string" length="64" nullable="false" />
    <field name="created" type="datetime" />
    <field name="updated" type="datetime" />
    <one-to-many field="users" target-entity="Rapsys\AirBundle\Entity\User" mapped-by="country" fetch="LAZY" />
    <unique-constraints>
      <unique-constraint name="code" columns="code" />
      <unique-constraint name="alpha" columns="alpha" />
    </unique-constraints>
    <lifecycle-callbacks>
      <lifecycle-callback type="preUpdate" method="preUpdate" />
    </lifecycle-callbacks>
  </entity>
</doctrine-mapping>
