Merge pull request #19840 from MikeyMJCO/patch-7
[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 <component>CiviPledge</component>
10 <field>
11 <name>id</name>
12 <uniqueName>pledge_id</uniqueName>
13 <title>Pledge ID</title>
14 <type>int unsigned</type>
15 <required>true</required>
16 <comment>Pledge ID</comment>
17 <import>true</import>
18 <html>
19 <type>Number</type>
20 </html>
21 <add>2.1</add>
22 </field>
23 <primaryKey>
24 <name>id</name>
25 <autoincrement>true</autoincrement>
26 </primaryKey>
27 <field>
28 <name>contact_id</name>
29 <uniqueName>pledge_contact_id</uniqueName>
30 <title>Contact ID</title>
31 <import>true</import>
32 <type>int unsigned</type>
33 <required>true</required>
34 <comment>Foreign key to civicrm_contact.id .</comment>
35 <add>2.1</add>
36 <html>
37 <type>EntityRef</type>
38 <label>Contact</label>
39 </html>
40 </field>
41 <foreignKey>
42 <name>contact_id</name>
43 <table>civicrm_contact</table>
44 <key>id</key>
45 <add>2.1</add>
46 <onDelete>CASCADE</onDelete>
47 </foreignKey>
48 <field>
49 <name>financial_type_id</name>
50 <title>Financial Type ID</title>
51 <uniqueName>pledge_financial_type_id</uniqueName>
52 <type>int unsigned</type>
53 <comment>FK to Financial Type</comment>
54 <pseudoconstant>
55 <table>civicrm_financial_type</table>
56 <keyColumn>id</keyColumn>
57 <labelColumn>name</labelColumn>
58 </pseudoconstant>
59 <add>4.3</add>
60 <html>
61 <type>Select</type>
62 <label>Financial Type</label>
63 </html>
64 </field>
65 <foreignKey>
66 <name>financial_type_id</name>
67 <table>civicrm_financial_type</table>
68 <key>id</key>
69 <add>4.3</add>
70 </foreignKey>
71 <field>
72 <name>contribution_page_id</name>
73 <uniqueName>pledge_contribution_page_id</uniqueName>
74 <title>Contribution Page ID</title>
75 <type>int unsigned</type>
76 <comment>The Contribution Page which triggered this contribution</comment>
77 <html>
78 <label>Contribution Page</label>
79 </html>
80 <add>2.1</add>
81 </field>
82 <foreignKey>
83 <name>contribution_page_id</name>
84 <table>civicrm_contribution_page</table>
85 <key>id</key>
86 <onDelete>SET NULL</onDelete>
87 </foreignKey>
88 <field>
89 <name>amount</name>
90 <uniqueName>pledge_amount</uniqueName>
91 <title>Total Pledged</title>
92 <type>decimal</type>
93 <required>true</required>
94 <import>true</import>
95 <comment>Total pledged amount.</comment>
96 <add>2.1</add>
97 <html>
98 <type>Text</type>
99 </html>
100 </field>
101 <field>
102 <name>original_installment_amount</name>
103 <uniqueName>pledge_original_installment_amount</uniqueName>
104 <title>Original Installment Amount</title>
105 <type>decimal</type>
106 <required>true</required>
107 <comment>Original amount for each of the installments.</comment>
108 <add>3.2</add>
109 <html>
110 <type>Text</type>
111 </html>
112 <export>true</export>
113 </field>
114 <field>
115 <name>currency</name>
116 <type>varchar</type>
117 <title>Pledge Currency</title>
118 <length>3</length>
119 <default>NULL</default>
120 <comment>3 character string, value from config setting or input via user.</comment>
121 <add>3.2</add>
122 <pseudoconstant>
123 <table>civicrm_currency</table>
124 <keyColumn>name</keyColumn>
125 <labelColumn>full_name</labelColumn>
126 <nameColumn>name</nameColumn>
127 <abbrColumn>symbol</abbrColumn>
128 </pseudoconstant>
129 <html>
130 <type>Select</type>
131 </html>
132 </field>
133 <field>
134 <name>frequency_unit</name>
135 <uniqueName>pledge_frequency_unit</uniqueName>
136 <title>Pledge Frequency Unit</title>
137 <type>varchar</type>
138 <required>true</required>
139 <length>8</length>
140 <default>'month'</default>
141 <comment>Time units for recurrence of pledge payments.</comment>
142 <pseudoconstant>
143 <optionGroupName>recur_frequency_units</optionGroupName>
144 <keyColumn>name</keyColumn>
145 </pseudoconstant>
146 <add>2.1</add>
147 <html>
148 <type>Select</type>
149 </html>
150 </field>
151 <field>
152 <name>frequency_interval</name>
153 <uniqueName>pledge_frequency_interval</uniqueName>
154 <title>Pledge Frequency Interval</title>
155 <type>int unsigned</type>
156 <required>true</required>
157 <default>1</default>
158 <comment>Number of time units for recurrence of pledge payments.</comment>
159 <add>2.1</add>
160 <html>
161 <type>Text</type>
162 </html>
163 </field>
164 <field>
165 <name>frequency_day</name>
166 <type>int unsigned</type>
167 <title>Pledge day</title>
168 <default>3</default>
169 <required>true</required>
170 <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>
171 <add>2.1</add>
172 <html>
173 <type>Select</type>
174 </html>
175 </field>
176 <field>
177 <name>installments</name>
178 <type>int unsigned</type>
179 <title>Pledge Number of Installments</title>
180 <default>1</default>
181 <required>true</required>
182 <comment>Total number of payments to be made.</comment>
183 <add>2.1</add>
184 <html>
185 <type>Text</type>
186 </html>
187 <export>true</export>
188 </field>
189 <field>
190 <name>start_date</name>
191 <type>datetime</type>
192 <title>Pledge Start Date</title>
193 <required>true</required>
194 <export>true</export>
195 <comment>The date the first scheduled pledge occurs.</comment>
196 <add>2.1</add>
197 <html>
198 <type>Select Date</type>
199 <formatType>activityDate</formatType>
200 </html>
201 <uniqueName>pledge_start_date</uniqueName>
202 <uniqueTitle>Payments Start Date</uniqueTitle>
203 </field>
204 <field>
205 <name>create_date</name>
206 <type>datetime</type>
207 <uniqueName>pledge_create_date</uniqueName>
208 <title>Pledge Made</title>
209 <required>true</required>
210 <import>true</import>
211 <export>true</export>
212 <comment>When this pledge record was created.</comment>
213 <add>2.1</add>
214 <html>
215 <type>Select Date</type>
216 <formatType>activityDate</formatType>
217 </html>
218 </field>
219 <field>
220 <name>acknowledge_date</name>
221 <type>datetime</type>
222 <title>Pledge Acknowledged</title>
223 <comment>When a pledge acknowledgement message was sent to the contributor.</comment>
224 <add>2.1</add>
225 <html>
226 <type>Select Date</type>
227 <formatType>activityDate</formatType>
228 </html>
229 </field>
230 <field>
231 <name>modified_date</name>
232 <type>datetime</type>
233 <title>Pledge Modified Date</title>
234 <comment>Last updated date for this pledge record.</comment>
235 <readonly>true</readonly>
236 <add>2.1</add>
237 </field>
238 <field>
239 <name>cancel_date</name>
240 <type>datetime</type>
241 <title>Pledge Cancelled Date</title>
242 <comment>Date this pledge was cancelled by contributor.</comment>
243 <add>2.1</add>
244 <html>
245 <type>Select Date</type>
246 <formatType>activityDate</formatType>
247 </html>
248 </field>
249 <field>
250 <name>end_date</name>
251 <type>datetime</type>
252 <title>Pledge End Date</title>
253 <export>true</export>
254 <comment>Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).</comment>
255 <add>2.1</add>
256 <html>
257 <type>Select Date</type>
258 <formatType>activityDate</formatType>
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 <required>true</required>
301 <import>true</import>
302 <export>false</export>
303 <type>int unsigned</type>
304 <html>
305 <type>Select</type>
306 </html>
307 <pseudoconstant>
308 <optionGroupName>pledge_status</optionGroupName>
309 </pseudoconstant>
310 <comment>Implicit foreign key to civicrm_option_values in the pledge_status option group.</comment>
311 <add>2.1</add>
312 </field>
313 <index>
314 <name>index_status</name>
315 <fieldName>status_id</fieldName>
316 <add>2.1</add>
317 </index>
318 <field>
319 <name>is_test</name>
320 <uniqueName>pledge_is_test</uniqueName>
321 <import>true</import>
322 <title>Test</title>
323 <type>boolean</type>
324 <default>0</default>
325 <required>true</required>
326 <html>
327 <type>CheckBox</type>
328 </html>
329 </field>
330 <field>
331 <name>campaign_id</name>
332 <component>CiviCampaign</component>
333 <uniqueName>pledge_campaign_id</uniqueName>
334 <type>int unsigned</type>
335 <title>Campaign ID</title>
336 <import>true</import>
337 <comment>The campaign for which this pledge has been initiated.</comment>
338 <add>3.4</add>
339 <html>
340 <type>EntityRef</type>
341 <label>Campaign</label>
342 </html>
343 </field>
344 <foreignKey>
345 <name>campaign_id</name>
346 <table>civicrm_campaign</table>
347 <key>id</key>
348 <onDelete>SET NULL</onDelete>
349 </foreignKey>
350 </table>