Merge pull request #21106 from eileenmcnaughton/order
[civicrm-core.git] / xml / schema / Contribute / ContributionSoft.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contribute</base>
5 <class>ContributionSoft</class>
6 <name>civicrm_contribution_soft</name>
7 <title>Contribution Soft Credit</title>
8 <titlePlural>Contribution Soft Credits</titlePlural>
9 <add>2.2</add>
10 <log>true</log>
11 <component>CiviContribute</component>
12 <title>Contribution Soft Credit</title>
13 <titlePlural>Contribution Soft Credits</titlePlural>
14 <field>
15 <name>id</name>
16 <uniqueName>contribution_soft_id</uniqueName>
17 <title>Soft Credit ID</title>
18 <type>int unsigned</type>
19 <required>true</required>
20 <import>true</import>
21 <comment>Soft Credit ID</comment>
22 <html>
23 <type>Number</type>
24 </html>
25 <add>2.2</add>
26 </field>
27 <primaryKey>
28 <name>id</name>
29 <autoincrement>true</autoincrement>
30 </primaryKey>
31 <field>
32 <name>contribution_id</name>
33 <title>Contribution ID</title>
34 <type>int unsigned</type>
35 <required>true</required>
36 <comment>FK to contribution table.</comment>
37 <html>
38 <label>Contribution</label>
39 </html>
40 <add>2.2</add>
41 </field>
42 <foreignKey>
43 <name>contribution_id</name>
44 <table>civicrm_contribution</table>
45 <key>id</key>
46 <add>2.2</add>
47 <onDelete>CASCADE</onDelete>
48 </foreignKey>
49 <field>
50 <name>contact_id</name>
51 <uniqueName>contribution_soft_contact_id</uniqueName>
52 <title>Contact ID</title>
53 <type>int unsigned</type>
54 <required>true</required>
55 <import>true</import>
56 <headerPattern>/contact(.?id)?/i</headerPattern>
57 <dataPattern>/^\d+$/</dataPattern>
58 <comment>FK to Contact ID</comment>
59 <html>
60 <label>Contact</label>
61 </html>
62 <add>2.2</add>
63 </field>
64 <foreignKey>
65 <name>contact_id</name>
66 <table>civicrm_contact</table>
67 <key>id</key>
68 <add>2.2</add>
69 <onDelete>CASCADE</onDelete>
70 </foreignKey>
71 <field>
72 <name>amount</name>
73 <title>Soft Credit Amount</title>
74 <type>decimal</type>
75 <required>true</required>
76 <import>true</import>
77 <headerPattern>/total(.?am(ou)?nt)?/i</headerPattern>
78 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
79 <comment>Amount of this soft credit.</comment>
80 <add>2.2</add>
81 </field>
82 <field>
83 <name>currency</name>
84 <type>varchar</type>
85 <title>Soft Contribution Currency</title>
86 <length>3</length>
87 <default>NULL</default>
88 <comment>3 character string, value from config setting or input via user.</comment>
89 <add>3.2</add>
90 <pseudoconstant>
91 <table>civicrm_currency</table>
92 <keyColumn>name</keyColumn>
93 <labelColumn>full_name</labelColumn>
94 <nameColumn>name</nameColumn>
95 <abbrColumn>symbol</abbrColumn>
96 </pseudoconstant>
97 <html>
98 <type>Select</type>
99 </html>
100 </field>
101 <field>
102 <name>pcp_id</name>
103 <type>int unsigned</type>
104 <title>PCP ID</title>
105 <default>NULL</default>
106 <comment>FK to civicrm_pcp.id</comment>
107 <html>
108 <label>PCP</label>
109 </html>
110 <add>2.2</add>
111 <pseudoconstant>
112 <table>civicrm_pcp</table>
113 <keyColumn>id</keyColumn>
114 <labelColumn>title</labelColumn>
115 </pseudoconstant>
116 </field>
117 <foreignKey>
118 <name>pcp_id</name>
119 <table>civicrm_pcp</table>
120 <key>id</key>
121 <add>3.1</add>
122 <onDelete>SET NULL</onDelete>
123 </foreignKey>
124 <index>
125 <name>index_id</name>
126 <fieldName>pcp_id</fieldName>
127 <add>2.2</add>
128 </index>
129 <field>
130 <name>pcp_display_in_roll</name>
131 <type>boolean</type>
132 <title>Soft Contribution Display on PCP</title>
133 <default>0</default>
134 <add>2.2</add>
135 </field>
136 <field>
137 <name>pcp_roll_nickname</name>
138 <type>varchar</type>
139 <title>Soft Contribution PCP Nickname</title>
140 <length>255</length>
141 <default>NULL</default>
142 <add>2.2</add>
143 </field>
144 <field>
145 <name>pcp_personal_note</name>
146 <type>varchar</type>
147 <title>Soft Contribution PCP Note</title>
148 <length>255</length>
149 <html>
150 <type>TextArea</type>
151 </html>
152 <default>NULL</default>
153 <add>2.2</add>
154 </field>
155 <field>
156 <name>soft_credit_type_id</name>
157 <type>int unsigned</type>
158 <default>NULL</default>
159 <title>Soft Credit Type</title>
160 <pseudoconstant>
161 <optionGroupName>soft_credit_type</optionGroupName>
162 </pseudoconstant>
163 <comment>Soft Credit Type ID.Implicit FK to civicrm_option_value where option_group = soft_credit_type.</comment>
164 <add>2.2</add>
165 </field>
166 </table>