Merge pull request #19714 from civicrm/5.35
[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 <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>
243 <html>
244 <type>Select Date</type>
245 <formatType>activityDate</formatType>
246 </html>
247 </field>
248 <field>
249 <name>end_date</name>
250 <type>datetime</type>
251 <title>Pledge End Date</title>
252 <export>true</export>
253 <comment>Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).</comment>
254 <add>2.1</add>
255 <html>
256 <type>Select Date</type>
257 <formatType>activityDate</formatType>
258 </html>
259 <uniqueName>pledge_end_date</uniqueName>
260 <uniqueTitle>Payments Ended Date</uniqueTitle>
261 </field>
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>
268 <html>
269 <type>Text</type>
270 </html>
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>
280 <html>
281 <type>Select</type>
282 </html>
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>
291 <html>
292 <type>Text</type>
293 </html>
294 </field>
295 <field>
296 <name>status_id</name>
297 <title>Pledge Status ID</title>
298 <uniqueName>pledge_status_id</uniqueName>
299 <required>true</required>
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 <required>true</required>
325 <html>
326 <type>CheckBox</type>
327 </html>
328 </field>
329 <field>
330 <name>campaign_id</name>
331 <uniqueName>pledge_campaign_id</uniqueName>
332 <type>int unsigned</type>
333 <title>Campaign ID</title>
334 <import>true</import>
335 <comment>The campaign for which this pledge has been initiated.</comment>
336 <add>3.4</add>
337 <html>
338 <type>Select</type>
339 <label>Campaign</label>
340 </html>
341 </field>
342 <foreignKey>
343 <name>campaign_id</name>
344 <table>civicrm_campaign</table>
345 <key>id</key>
346 <onDelete>SET NULL</onDelete>
347 </foreignKey>
348 </table>