Merge pull request #19093 from civicrm/5.32
[civicrm-core.git] / xml / schema / Financial / EntityFinancialTrxn.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Financial</base>
5 <class>EntityFinancialTrxn</class>
6 <name>civicrm_entity_financial_trxn</name>
7 <add>3.2</add>
8 <component>CiviContribute</component>
9 <field>
10 <name>id</name>
11 <title>Entity Financial Transaction ID</title>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>ID</comment>
15 <add>3.2</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>entity_table</name>
23 <title>Entity Table</title>
24 <type>varchar</type>
25 <length>64</length>
26 <required>true</required>
27 <import>true</import>
28 <add>3.2</add>
29 <comment>May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc</comment>
30 </field>
31 <field>
32 <name>entity_id</name>
33 <title>Entity ID</title>
34 <type>int unsigned</type>
35 <required>true</required>
36 <add>3.2</add>
37 </field>
38 <dynamicForeignKey>
39 <idColumn>entity_id</idColumn>
40 <typeColumn>entity_table</typeColumn>
41 <add>3.2</add>
42 </dynamicForeignKey>
43 <field>
44 <name>financial_trxn_id</name>
45 <title>Financial Transaction Id</title>
46 <type>int unsigned</type>
47 <add>3.2</add>
48 </field>
49 <foreignKey>
50 <name>financial_trxn_id</name>
51 <table>civicrm_financial_trxn</table>
52 <key>id</key>
53 <add>3.2</add>
54 <onDelete>SET NULL</onDelete>
55 </foreignKey>
56 <field>
57 <name>amount</name>
58 <title>Amount</title>
59 <type>decimal</type>
60 <required>true</required>
61 <import>true</import>
62 <headerPattern>/amount/i</headerPattern>
63 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
64 <comment>allocated amount of transaction to this entity</comment>
65 <add>3.2</add>
66 </field>
67 <index>
68 <name>UI_entity_financial_trxn_entity_table</name>
69 <fieldName>entity_table</fieldName>
70 <add>4.3</add>
71 </index>
72 <index>
73 <name>UI_entity_financial_trxn_entity_id</name>
74 <fieldName>entity_id</fieldName>
75 <add>4.3</add>
76 </index>
77 </table>
78