]> Raphaƫl G. Git Repositories - airbundle/blob - config/doctrine/Snippet.orm.xml
Version 0.6.0
[airbundle] / config / doctrine / Snippet.orm.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <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">
3 <entity name="Rapsys\AirBundle\Entity\Snippet" repository-class="Rapsys\AirBundle\Repository\SnippetRepository" table="snippets">
4 <id name="id" type="integer">
5 <generator strategy="AUTO" />
6 <options>
7 <option name="unsigned">true</option>
8 </options>
9 </id>
10 <field name="locale" type="string" length="5" />
11 <field name="description" type="text" nullable="true" />
12 <field name="class" type="text" nullable="true" />
13 <field name="short" type="text" nullable="true" />
14 <field name="rate" type="integer" nullable="true">
15 <options>
16 <option name="unsigned">1</option>
17 </options>
18 </field>
19 <field name="hat" type="boolean" nullable="true" />
20 <field name="contact" type="string" length="254" nullable="true" />
21 <field name="donate" type="string" length="254" nullable="true" />
22 <field name="link" type="string" length="254" nullable="true" />
23 <field name="profile" type="string" length="254" nullable="true" />
24 <field name="created" type="datetime" />
25 <field name="updated" type="datetime" />
26 <many-to-one field="location" target-entity="Rapsys\AirBundle\Entity\Location" inversed-by="snippets" fetch="LAZY">
27 <join-columns>
28 <join-column name="location_id" referenced-column-name="id" />
29 </join-columns>
30 </many-to-one>
31 <many-to-one field="user" target-entity="Rapsys\AirBundle\Entity\User" inversed-by="snippets" fetch="LAZY">
32 <join-columns>
33 <join-column name="user_id" referenced-column-name="id" />
34 </join-columns>
35 </many-to-one>
36 <indexes>
37 <index name="locale_user" columns="locale,user_id" />
38 </indexes>
39 <unique-constraints>
40 <unique-constraint name="locale_location_user" columns="locale,location_id,user_id" />
41 </unique-constraints>
42 <lifecycle-callbacks>
43 <lifecycle-callback type="preUpdate" method="preUpdate" />
44 </lifecycle-callbacks>
45 </entity>
46 </doctrine-mapping>