Merge pull request #21648 from eileenmcnaughton/email_task
[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 <html>
16 <type>Number</type>
17 </html>
18 <add>3.2</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>entity_table</name>
26 <title>Entity Table</title>
27 <type>varchar</type>
28 <length>64</length>
29 <required>true</required>
30 <import>true</import>
31 <pseudoconstant>
32 <callback>CRM_Financial_BAO_EntityFinancialTrxn::entityTables</callback>
33 </pseudoconstant>
34 <add>3.2</add>
35 <comment>May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc</comment>
36 </field>
37 <field>
38 <name>entity_id</name>
39 <title>Entity ID</title>
40 <type>int unsigned</type>
41 <required>true</required>
42 <add>3.2</add>
43 </field>
44 <dynamicForeignKey>
45 <idColumn>entity_id</idColumn>
46 <typeColumn>entity_table</typeColumn>
47 <add>3.2</add>
48 </dynamicForeignKey>
49 <field>
50 <name>financial_trxn_id</name>
51 <title>Financial Transaction ID</title>
52 <type>int unsigned</type>
53 <html>
54 <label>Financial Transaction</label>
55 </html>
56 <add>3.2</add>
57 </field>
58 <foreignKey>
59 <name>financial_trxn_id</name>
60 <table>civicrm_financial_trxn</table>
61 <key>id</key>
62 <add>3.2</add>
63 <onDelete>SET NULL</onDelete>
64 </foreignKey>
65 <field>
66 <name>amount</name>
67 <title>Amount</title>
68 <type>decimal</type>
69 <required>true</required>
70 <import>true</import>
71 <headerPattern>/amount/i</headerPattern>
72 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
73 <comment>allocated amount of transaction to this entity</comment>
74 <add>3.2</add>
75 </field>
76 <index>
77 <name>UI_entity_financial_trxn_entity_table</name>
78 <fieldName>entity_table</fieldName>
79 <add>4.3</add>
80 </index>
81 <index>
82 <name>UI_entity_financial_trxn_entity_id</name>
83 <fieldName>entity_id</fieldName>
84 <add>4.3</add>
85 </index>
86 </table>
87