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