Merge pull request #7244 from systopia/CRM-17589
[civicrm-core.git] / xml / schema / Financial / EntityFinancialAccount.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Financial</base>
5 <class>EntityFinancialAccount</class>
6 <name>civicrm_entity_financial_account</name>
7 <add>4.3</add>
8 <comment>Map between an entity and a financial account, where there is a specific relationship between the financial account and the entity, e.g. Income Account for or AR Account for</comment>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <title>Entity Financial Account ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>ID</comment>
16 <add>4.3</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>entity_table</name>
24 <title>Entity Table</title>
25 <type>varchar</type>
26 <length>64</length>
27 <required>true</required>
28 <import>true</import>
29 <add>4.3</add>
30 <comment>Links to an entity_table like civicrm_financial_type</comment>
31 </field>
32 <field>
33 <name>entity_id</name>
34 <title>Entity ID</title>
35 <type>int unsigned</type>
36 <required>true</required>
37 <add>4.3</add>
38 <comment>Links to an id in the entity_table, such as vid in civicrm_financial_type</comment>
39 </field>
40 <dynamicForeignKey>
41 <idColumn>entity_id</idColumn>
42 <typeColumn>entity_table</typeColumn>
43 <add>4.3</add>
44 </dynamicForeignKey>
45 <field>
46 <name>account_relationship</name>
47 <title>Account Relationship</title>
48 <type>int unsigned</type>
49 <required>true</required>
50 <add>4.3</add>
51 <comment>FK to a new civicrm_option_value (account_relationship)</comment>
52 <pseudoconstant>
53 <optionGroupName>account_relationship</optionGroupName>
54 </pseudoconstant>
55 <html>
56 <type>Select</type>
57 </html>
58 </field>
59 <field>
60 <name>financial_account_id</name>
61 <type>int unsigned</type>
62 <title>Financial Account</title>
63 <required>true</required>
64 <add>4.3</add>
65 <comment>FK to the financial_account_id</comment>
66 <pseudoconstant>
67 <table>civicrm_financial_account</table>
68 <keyColumn>id</keyColumn>
69 <labelColumn>name</labelColumn>
70 </pseudoconstant>
71 <html>
72 <type>Select</type>
73 </html>
74 </field>
75 <foreignKey>
76 <name>financial_account_id</name>
77 <table>civicrm_financial_account</table>
78 <key>id</key>
79 <add>4.3</add>
80 <onDelete>RESTRICT</onDelete>
81 </foreignKey>
82 </table>
83