Merge pull request #19525 from eileenmcnaughton/member_soft
[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>
6 <add>2.1</add>
7 <log>true</log>
449c4e6b 8 <icon>fa-paper-plane</icon>
d31fb4e3 9 <component>CiviPledge</component>
6a488035
TO
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>
0481e12c
A
18 <html>
19 <type>Number</type>
20 </html>
6a488035
TO
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>
614d72ec 36 <html>
57e94608
A
37 <type>EntityRef</type>
38 <label>Contact</label>
39 </html>
6a488035
TO
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>
3c7d2158 48 <field>
49 <name>financial_type_id</name>
047c5009 50 <title>Financial Type ID</title>
6a488035 51 <uniqueName>pledge_financial_type_id</uniqueName>
3c7d2158 52 <type>int unsigned</type>
6a488035 53 <comment>FK to Financial Type</comment>
6cc0b7bd
EM
54 <pseudoconstant>
55 <table>civicrm_financial_type</table>
56 <keyColumn>id</keyColumn>
57 <labelColumn>name</labelColumn>
58 </pseudoconstant>
3c7d2158 59 <add>4.3</add>
614d72ec 60 <html>
61 <type>Select</type>
047c5009 62 <label>Financial Type</label>
614d72ec 63 </html>
3c7d2158 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>
6a488035
TO
72 <name>contribution_page_id</name>
73 <uniqueName>pledge_contribution_page_id</uniqueName>
047c5009 74 <title>Contribution Page ID</title>
3c7d2158 75 <type>int unsigned</type>
76 <comment>The Contribution Page which triggered this contribution</comment>
57e94608 77 <html>
047c5009 78 <label>Contribution Page</label>
57e94608 79 </html>
3c7d2158 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>
6a488035
TO
86 <onDelete>SET NULL</onDelete>
87 </foreignKey>
88 <field>
89 <name>amount</name>
3c7d2158 90 <uniqueName>pledge_amount</uniqueName>
6a488035
TO
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>
614d72ec 97 <html>
98 <type>Text</type>
99 </html>
6a488035
TO
100 </field>
101 <field>
102 <name>original_installment_amount</name>
3c7d2158 103 <uniqueName>pledge_original_installment_amount</uniqueName>
6a488035
TO
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>
614d72ec 109 <html>
110 <type>Text</type>
111 </html>
db517dfe 112 <export>true</export>
6a488035
TO
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>
bd44e0df
AS
122 <pseudoconstant>
123 <table>civicrm_currency</table>
124 <keyColumn>name</keyColumn>
a38a89fc 125 <labelColumn>full_name</labelColumn>
c3de5c5a 126 <nameColumn>name</nameColumn>
a8fdb24e 127 <abbrColumn>symbol</abbrColumn>
bd44e0df 128 </pseudoconstant>
614d72ec 129 <html>
e0991796 130 <type>Select</type>
614d72ec 131 </html>
6a488035
TO
132 </field>
133 <field>
134 <name>frequency_unit</name>
135 <uniqueName>pledge_frequency_unit</uniqueName>
136 <title>Pledge Frequency Unit</title>
be622aca 137 <type>varchar</type>
64a05eb1 138 <required>true</required>
be622aca 139 <length>8</length>
6a488035
TO
140 <default>'month'</default>
141 <comment>Time units for recurrence of pledge payments.</comment>
71a707c3 142 <pseudoconstant>
143 <optionGroupName>recur_frequency_units</optionGroupName>
144 <keyColumn>name</keyColumn>
145 </pseudoconstant>
6a488035 146 <add>2.1</add>
614d72ec 147 <html>
148 <type>Select</type>
149 </html>
6a488035
TO
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>
614d72ec 160 <html>
161 <type>Text</type>
162 </html>
6a488035
TO
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>
614d72ec 172 <html>
173 <type>Select</type>
174 </html>
6a488035
TO
175 </field>
176 <field>
177 <name>installments</name>
178 <type>int unsigned</type>
179 <title>Pledge Number of Installments</title>
180 <default>1</default>
64a05eb1 181 <required>true</required>
6a488035
TO
182 <comment>Total number of payments to be made.</comment>
183 <add>2.1</add>
614d72ec 184 <html>
185 <type>Text</type>
186 </html>
db517dfe 187 <export>true</export>
6a488035
TO
188 </field>
189 <field>
190 <name>start_date</name>
191 <type>datetime</type>
192 <title>Pledge Start Date</title>
193 <required>true</required>
a5e468ff 194 <export>true</export>
6a488035
TO
195 <comment>The date the first scheduled pledge occurs.</comment>
196 <add>2.1</add>
614d72ec 197 <html>
a5e468ff 198 <type>Select Date</type>
efcda6b9 199 <formatType>activityDate</formatType>
a5e468ff
SL
200 </html>
201 <uniqueName>pledge_start_date</uniqueName>
202 <uniqueTitle>Payments Start Date</uniqueTitle>
6a488035
TO
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>
a5e468ff 211 <export>true</export>
6a488035
TO
212 <comment>When this pledge record was created.</comment>
213 <add>2.1</add>
614d72ec 214 <html>
215 <type>Select Date</type>
efcda6b9 216 <formatType>activityDate</formatType>
614d72ec 217 </html>
6a488035
TO
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>
614d72ec 225 <html>
a5e468ff 226 <type>Select Date</type>
efcda6b9 227 <formatType>activityDate</formatType>
614d72ec 228 </html>
6a488035
TO
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 <add>2.1</add>
236 </field>
237 <field>
238 <name>cancel_date</name>
239 <type>datetime</type>
240 <title>Pledge Cancelled Date</title>
241 <comment>Date this pledge was cancelled by contributor.</comment>
242 <add>2.1</add>
614d72ec 243 <html>
a5e468ff 244 <type>Select Date</type>
efcda6b9 245 <formatType>activityDate</formatType>
614d72ec 246 </html>
6a488035
TO
247 </field>
248 <field>
249 <name>end_date</name>
250 <type>datetime</type>
251 <title>Pledge End Date</title>
a5e468ff 252 <export>true</export>
6a488035
TO
253 <comment>Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).</comment>
254 <add>2.1</add>
614d72ec 255 <html>
a5e468ff 256 <type>Select Date</type>
efcda6b9 257 <formatType>activityDate</formatType>
614d72ec 258 </html>
a5e468ff
SL
259 <uniqueName>pledge_end_date</uniqueName>
260 <uniqueTitle>Payments Ended Date</uniqueTitle>
6a488035 261 </field>
6a488035
TO
262 <field>
263 <name>max_reminders</name>
264 <title>Maximum Number of Reminders</title>
265 <type>int unsigned</type>
266 <default>1</default>
267 <comment>The maximum number of payment reminders to send for any given payment.</comment>
614d72ec 268 <html>
a5e468ff
SL
269 <type>Text</type>
270 </html>
6a488035
TO
271 <add>2.1</add>
272 </field>
273 <field>
274 <name>initial_reminder_day</name>
275 <title>Initial Reminder Day</title>
276 <type>int unsigned</type>
277 <default>5</default>
278 <comment>Send initial reminder this many days prior to the payment due date.</comment>
279 <add>2.1</add>
614d72ec 280 <html>
a5e468ff
SL
281 <type>Select</type>
282 </html>
6a488035
TO
283 </field>
284 <field>
285 <name>additional_reminder_day</name>
286 <title>Additional Reminder Days</title>
287 <type>int unsigned</type>
288 <default>5</default>
289 <comment>Send additional reminder this many days after last one sent, up to maximum number of reminders.</comment>
290 <add>2.1</add>
614d72ec 291 <html>
a5e468ff
SL
292 <type>Text</type>
293 </html>
6a488035
TO
294 </field>
295 <field>
296 <name>status_id</name>
047c5009 297 <title>Pledge Status ID</title>
6a488035 298 <uniqueName>pledge_status_id</uniqueName>
64a05eb1 299 <required>true</required>
6a488035
TO
300 <import>true</import>
301 <export>false</export>
302 <type>int unsigned</type>
52ddd94d 303 <html>
304 <type>Select</type>
305 </html>
294cc627 306 <pseudoconstant>
01dac399 307 <optionGroupName>pledge_status</optionGroupName>
294cc627 308 </pseudoconstant>
01dac399 309 <comment>Implicit foreign key to civicrm_option_values in the pledge_status option group.</comment>
6a488035
TO
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>
3c7d2158 317 <field>
318 <name>is_test</name>
319 <uniqueName>pledge_is_test</uniqueName>
6a488035
TO
320 <import>true</import>
321 <title>Test</title>
322 <type>boolean</type>
323 <default>0</default>
64a05eb1 324 <required>true</required>
614d72ec 325 <html>
326 <type>CheckBox</type>
327 </html>
6a488035 328 </field>
3c7d2158 329 <field>
330 <name>campaign_id</name>
6a488035 331 <uniqueName>pledge_campaign_id</uniqueName>
3c7d2158 332 <type>int unsigned</type>
57e94608 333 <title>Campaign ID</title>
3c7d2158 334 <import>true</import>
335 <comment>The campaign for which this pledge has been initiated.</comment>
336 <add>3.4</add>
614d72ec 337 <html>
338 <type>Select</type>
57e94608 339 <label>Campaign</label>
614d72ec 340 </html>
3c7d2158 341 </field>
342 <foreignKey>
343 <name>campaign_id</name>
344 <table>civicrm_campaign</table>
345 <key>id</key>
6a488035
TO
346 <onDelete>SET NULL</onDelete>
347 </foreignKey>
348</table>