Merge pull request #16918 from mattwire/smartyerrorevent
[civicrm-core.git] / xml / schema / Pledge / Pledge.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Pledge</base>
4 <class>Pledge</class>
5 <name>civicrm_pledge</name>
6 <add>2.1</add>
7 <log>true</log>
8 <icon>fa-paper-plane</icon>
9 <field>
10 <name>id</name>
11 <uniqueName>pledge_id</uniqueName>
12 <title>Pledge ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Pledge ID</comment>
16 <import>true</import>
17 <add>2.1</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>contact_id</name>
25 <uniqueName>pledge_contact_id</uniqueName>
26 <title>Contact ID</title>
27 <import>true</import>
28 <type>int unsigned</type>
29 <required>true</required>
30 <comment>Foreign key to civicrm_contact.id .</comment>
31 <add>2.1</add>
32 <html>
33 <type>EntityRef</type>
34 </html>
35 </field>
36 <foreignKey>
37 <name>contact_id</name>
38 <table>civicrm_contact</table>
39 <key>id</key>
40 <add>2.1</add>
41 <onDelete>CASCADE</onDelete>
42 </foreignKey>
43 <field>
44 <name>contribution_type_id</name>
45 <uniqueName>pledge_contribution_type_id</uniqueName>
46 <export>false</export>
47 <type>int unsigned</type>
48 <comment>FK to Contribution Type. This is propagated to contribution record when pledge payments are made.</comment>
49 <add>2.1</add>
50 <drop>4.3</drop>
51 </field>
52 <foreignKey>
53 <name>contribution_type_id</name>
54 <table>civicrm_contribution_type</table>
55 <key>id</key>
56 <add>2.1</add>
57 <drop>4.3</drop>
58 <onDelete>SET NULL</onDelete>
59 </foreignKey>
60 <field>
61 <name>financial_type_id</name>
62 <title>Type</title>
63 <uniqueName>pledge_financial_type_id</uniqueName>
64 <type>int unsigned</type>
65 <comment>FK to Financial Type</comment>
66 <pseudoconstant>
67 <table>civicrm_financial_type</table>
68 <keyColumn>id</keyColumn>
69 <labelColumn>name</labelColumn>
70 </pseudoconstant>
71 <add>4.3</add>
72 <html>
73 <type>Select</type>
74 </html>
75 </field>
76 <foreignKey>
77 <name>financial_type_id</name>
78 <table>civicrm_financial_type</table>
79 <key>id</key>
80 <add>4.3</add>
81 </foreignKey>
82 <field>
83 <name>contribution_page_id</name>
84 <uniqueName>pledge_contribution_page_id</uniqueName>
85 <title>Pledge Contribution Page</title>
86 <type>int unsigned</type>
87 <comment>The Contribution Page which triggered this contribution</comment>
88 <add>2.1</add>
89 </field>
90 <foreignKey>
91 <name>contribution_page_id</name>
92 <table>civicrm_contribution_page</table>
93 <key>id</key>
94 <onDelete>SET NULL</onDelete>
95 </foreignKey>
96 <field>
97 <name>amount</name>
98 <uniqueName>pledge_amount</uniqueName>
99 <title>Total Pledged</title>
100 <type>decimal</type>
101 <required>true</required>
102 <import>true</import>
103 <comment>Total pledged amount.</comment>
104 <add>2.1</add>
105 <html>
106 <type>Text</type>
107 </html>
108 </field>
109 <field>
110 <name>original_installment_amount</name>
111 <uniqueName>pledge_original_installment_amount</uniqueName>
112 <title>Original Installment Amount</title>
113 <type>decimal</type>
114 <required>true</required>
115 <comment>Original amount for each of the installments.</comment>
116 <add>3.2</add>
117 <html>
118 <type>Text</type>
119 </html>
120 <export>true</export>
121 </field>
122 <field>
123 <name>currency</name>
124 <type>varchar</type>
125 <title>Pledge Currency</title>
126 <length>3</length>
127 <default>NULL</default>
128 <comment>3 character string, value from config setting or input via user.</comment>
129 <add>3.2</add>
130 <pseudoconstant>
131 <table>civicrm_currency</table>
132 <keyColumn>name</keyColumn>
133 <labelColumn>full_name</labelColumn>
134 <nameColumn>name</nameColumn>
135 <abbrColumn>symbol</abbrColumn>
136 </pseudoconstant>
137 <html>
138 <type>Select</type>
139 </html>
140 </field>
141 <field>
142 <name>frequency_unit</name>
143 <uniqueName>pledge_frequency_unit</uniqueName>
144 <title>Pledge Frequency Unit</title>
145 <type>varchar</type>
146 <length>8</length>
147 <default>'month'</default>
148 <comment>Time units for recurrence of pledge payments.</comment>
149 <pseudoconstant>
150 <optionGroupName>recur_frequency_units</optionGroupName>
151 <keyColumn>name</keyColumn>
152 </pseudoconstant>
153 <add>2.1</add>
154 <html>
155 <type>Select</type>
156 </html>
157 </field>
158 <field>
159 <name>frequency_interval</name>
160 <uniqueName>pledge_frequency_interval</uniqueName>
161 <title>Pledge Frequency Interval</title>
162 <type>int unsigned</type>
163 <required>true</required>
164 <default>1</default>
165 <comment>Number of time units for recurrence of pledge payments.</comment>
166 <add>2.1</add>
167 <html>
168 <type>Text</type>
169 </html>
170 </field>
171 <field>
172 <name>frequency_day</name>
173 <type>int unsigned</type>
174 <title>Pledge day</title>
175 <default>3</default>
176 <required>true</required>
177 <comment>Day in the period when the pledge payment is due e.g. 1st of month, 15th etc. Use this to set the scheduled dates for pledge payments.</comment>
178 <add>2.1</add>
179 <html>
180 <type>Select</type>
181 </html>
182 </field>
183 <field>
184 <name>installments</name>
185 <type>int unsigned</type>
186 <title>Pledge Number of Installments</title>
187 <default>1</default>
188 <comment>Total number of payments to be made.</comment>
189 <add>2.1</add>
190 <html>
191 <type>Text</type>
192 </html>
193 <export>true</export>
194 </field>
195 <field>
196 <name>start_date</name>
197 <type>datetime</type>
198 <title>Pledge Start Date</title>
199 <required>true</required>
200 <export>true</export>
201 <comment>The date the first scheduled pledge occurs.</comment>
202 <add>2.1</add>
203 <html>
204 <type>Select Date</type>
205 </html>
206 <uniqueName>pledge_start_date</uniqueName>
207 <uniqueTitle>Payments Start Date</uniqueTitle>
208 </field>
209 <field>
210 <name>create_date</name>
211 <type>datetime</type>
212 <uniqueName>pledge_create_date</uniqueName>
213 <title>Pledge Made</title>
214 <required>true</required>
215 <import>true</import>
216 <export>true</export>
217 <comment>When this pledge record was created.</comment>
218 <add>2.1</add>
219 <html>
220 <type>Select Date</type>
221 </html>
222 </field>
223 <field>
224 <name>acknowledge_date</name>
225 <type>datetime</type>
226 <title>Pledge Acknowledged</title>
227 <comment>When a pledge acknowledgement message was sent to the contributor.</comment>
228 <add>2.1</add>
229 <html>
230 <type>Select Date</type>
231 </html>
232 </field>
233 <field>
234 <name>modified_date</name>
235 <type>datetime</type>
236 <title>Pledge Modified Date</title>
237 <comment>Last updated date for this pledge record.</comment>
238 <add>2.1</add>
239 </field>
240 <field>
241 <name>cancel_date</name>
242 <type>datetime</type>
243 <title>Pledge Cancelled Date</title>
244 <comment>Date this pledge was cancelled by contributor.</comment>
245 <add>2.1</add>
246 <html>
247 <type>Select Date</type>
248 </html>
249 </field>
250 <field>
251 <name>end_date</name>
252 <type>datetime</type>
253 <title>Pledge End Date</title>
254 <export>true</export>
255 <comment>Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).</comment>
256 <add>2.1</add>
257 <html>
258 <type>Select Date</type>
259 </html>
260 <uniqueName>pledge_end_date</uniqueName>
261 <uniqueTitle>Payments Ended Date</uniqueTitle>
262 </field>
263 <field>
264 <name>max_reminders</name>
265 <title>Maximum Number of Reminders</title>
266 <type>int unsigned</type>
267 <default>1</default>
268 <comment>The maximum number of payment reminders to send for any given payment.</comment>
269 <html>
270 <type>Text</type>
271 </html>
272 <add>2.1</add>
273 </field>
274 <field>
275 <name>initial_reminder_day</name>
276 <title>Initial Reminder Day</title>
277 <type>int unsigned</type>
278 <default>5</default>
279 <comment>Send initial reminder this many days prior to the payment due date.</comment>
280 <add>2.1</add>
281 <html>
282 <type>Select</type>
283 </html>
284 </field>
285 <field>
286 <name>additional_reminder_day</name>
287 <title>Additional Reminder Days</title>
288 <type>int unsigned</type>
289 <default>5</default>
290 <comment>Send additional reminder this many days after last one sent, up to maximum number of reminders.</comment>
291 <add>2.1</add>
292 <html>
293 <type>Text</type>
294 </html>
295 </field>
296 <field>
297 <name>status_id</name>
298 <title>Pledge Status Id</title>
299 <uniqueName>pledge_status_id</uniqueName>
300 <import>true</import>
301 <export>false</export>
302 <type>int unsigned</type>
303 <html>
304 <type>Select</type>
305 </html>
306 <pseudoconstant>
307 <optionGroupName>pledge_status</optionGroupName>
308 </pseudoconstant>
309 <comment>Implicit foreign key to civicrm_option_values in the pledge_status option group.</comment>
310 <add>2.1</add>
311 </field>
312 <index>
313 <name>index_status</name>
314 <fieldName>status_id</fieldName>
315 <add>2.1</add>
316 </index>
317 <field>
318 <name>is_test</name>
319 <uniqueName>pledge_is_test</uniqueName>
320 <import>true</import>
321 <title>Test</title>
322 <type>boolean</type>
323 <default>0</default>
324 <html>
325 <type>CheckBox</type>
326 </html>
327 </field>
328 <field>
329 <name>campaign_id</name>
330 <uniqueName>pledge_campaign_id</uniqueName>
331 <type>int unsigned</type>
332 <title>Campaign</title>
333 <import>true</import>
334 <comment>The campaign for which this pledge has been initiated.</comment>
335 <pseudoconstant>
336 <table>civicrm_campaign</table>
337 <keyColumn>id</keyColumn>
338 <labelColumn>title</labelColumn>
339 </pseudoconstant>
340 <add>3.4</add>
341 <html>
342 <type>Select</type>
343 </html>
344 </field>
345 <foreignKey>
346 <name>campaign_id</name>
347 <table>civicrm_campaign</table>
348 <key>id</key>
349 <onDelete>SET NULL</onDelete>
350 </foreignKey>
351 </table>