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