<?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\Snippet" repository-class="Rapsys\AirBundle\Repository\SnippetRepository" table="snippets">
    <id name="id" type="integer">
      <generator strategy="AUTO" />
      <options>
        <option name="unsigned">true</option>
      </options>
    </id>
    <field name="locale" type="string" length="5" />
    <field name="description" type="text" nullable="true" />
    <field name="class" type="text" nullable="true" />
    <field name="short" type="text" nullable="true" />
    <field name="rate" type="integer" nullable="true">
      <options>
        <option name="unsigned">1</option>
      </options>
    </field>
    <field name="hat" type="boolean" nullable="true" />
    <field name="contact" type="string" length="254" nullable="true" />
    <field name="donate" type="string" length="254" nullable="true" />
    <field name="link" type="string" length="254" nullable="true" />
    <field name="profile" type="string" length="254" nullable="true" />
    <field name="created" type="datetime" />
    <field name="updated" type="datetime" />
    <many-to-one field="location" target-entity="Rapsys\AirBundle\Entity\Location" inversed-by="snippets" fetch="LAZY">
      <join-columns>
        <join-column name="location_id" referenced-column-name="id" />
      </join-columns>
    </many-to-one>
    <many-to-one field="user" target-entity="Rapsys\AirBundle\Entity\User" inversed-by="snippets" fetch="LAZY">
      <join-columns>
        <join-column name="user_id" referenced-column-name="id" />
      </join-columns>
    </many-to-one>
    <indexes>
      <index name="locale_user" columns="locale,user_id" />
    </indexes>
    <unique-constraints>
      <unique-constraint name="locale_location_user" columns="locale,location_id,user_id" />
    </unique-constraints>
    <lifecycle-callbacks>
      <lifecycle-callback type="preUpdate" method="preUpdate" />
    </lifecycle-callbacks>
  </entity>
</doctrine-mapping>
