Merge pull request #20607 from colemanw/searchDisplayAccessBypass
[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 <description>Promises to contribute at a future time, either in full, or at regular intervals until a total goal is reached.</description>
7 <add>2.1</add>
8 <log>true</log>
9 <icon>fa-paper-plane</icon>
10 <component>CiviPledge</component>
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>
19 <html>
20 <type>Number</type>
21 </html>
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>
37 <html>
38 <type>EntityRef</type>
39 <label>Contact</label>
40 </html>
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>
49 <field>
50 <name>financial_type_id</name>
51 <title>Financial Type ID</title>
52 <uniqueName>pledge_financial_type_id</uniqueName>
53 <type>int unsigned</type>
54 <comment>FK to Financial Type</comment>
55 <pseudoconstant>
56 <table>civicrm_financial_type</table>
57 <keyColumn>id</keyColumn>
58 <labelColumn>name</labelColumn>
59 </pseudoconstant>
60 <add>4.3</add>
61 <html>
62 <type>Select</type>
63 <label>Financial Type</label>
64 </html>
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>
73 <name>contribution_page_id</name>
74 <uniqueName>pledge_contribution_page_id</uniqueName>
75 <title>Contribution Page ID</title>
76 <type>int unsigned</type>
77 <comment>The Contribution Page which triggered this contribution</comment>
78 <html>
79 <label>Contribution Page</label>
80 </html>
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>
87 <onDelete>SET NULL</onDelete>
88 </foreignKey>
89 <field>
90 <name>amount</name>
91 <uniqueName>pledge_amount</uniqueName>
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>
98 <html>
99 <type>Text</type>
100 </html>
101 </field>
102 <field>
103 <name>original_installment_amount</name>
104 <uniqueName>pledge_original_installment_amount</uniqueName>
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>
110 <html>
111 <type>Text</type>
112 </html>
113 <export>true</export>
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>
123 <pseudoconstant>
124 <table>civicrm_currency</table>
125 <keyColumn>name</keyColumn>
126 <labelColumn>full_name</labelColumn>
127 <nameColumn>name</nameColumn>
128 <abbrColumn>symbol</abbrColumn>
129 </pseudoconstant>
130 <html>
131 <type>Select</type>
132 </html>
133 </field>
134 <field>
135 <name>frequency_unit</name>
136 <uniqueName>pledge_frequency_unit</uniqueName>
137 <title>Pledge Frequency Unit</title>
138 <type>varchar</type>
139 <required>true</required>
140 <length>8</length>
141 <default>'month'</default>
142 <comment>Time units for recurrence of pledge payments.</comment>
143 <pseudoconstant>
144 <optionGroupName>recur_frequency_units</optionGroupName>
145 <keyColumn>name</keyColumn>
146 </pseudoconstant>
147 <add>2.1</add>
148 <html>
149 <type>Select</type>
150 </html>
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>
161 <html>
162 <type>Text</type>
163 </html>
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>
173 <html>
174 <type>Select</type>
175 </html>
176 </field>
177 <field>
178 <name>installments</name>
179 <type>int unsigned</type>
180 <title>Pledge Number of Installments</title>
181 <default>1</default>
182 <required>true</required>
183 <comment>Total number of payments to be made.</comment>
184 <add>2.1</add>
185 <html>
186 <type>Text</type>
187 </html>
188 <export>true</export>
189 </field>
190 <field>
191 <name>start_date</name>
192 <type>datetime</type>
193 <title>Pledge Start Date</title>
194 <required>true</required>
195 <export>true</export>
196 <comment>The date the first scheduled pledge occurs.</comment>
197 <add>2.1</add>
198 <html>
199 <type>Select Date</type>
200 <formatType>activityDate</formatType>
201 </html>
202 <uniqueName>pledge_start_date</uniqueName>
203 <uniqueTitle>Payments Start Date</uniqueTitle>
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>
212 <export>true</export>
213 <comment>When this pledge record was created.</comment>
214 <add>2.1</add>
215 <html>
216 <type>Select Date</type>
217 <formatType>activityDate</formatType>
218 </html>
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>
226 <html>
227 <type>Select Date</type>
228 <formatType>activityDate</formatType>
229 </html>
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>
236 <readonly>true</readonly>
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>
245 <html>
246 <type>Select Date</type>
247 <formatType>activityDate</formatType>
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 <formatType>activityDate</formatType>
260 </html>
261 <uniqueName>pledge_end_date</uniqueName>
262 <uniqueTitle>Payments Ended Date</uniqueTitle>
263 </field>
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>
270 <html>
271 <type>Text</type>
272 </html>
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>
282 <html>
283 <type>Select</type>
284 </html>
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>
293 <html>
294 <type>Text</type>
295 </html>
296 </field>
297 <field>
298 <name>status_id</name>
299 <title>Pledge Status ID</title>
300 <uniqueName>pledge_status_id</uniqueName>
301 <required>true</required>
302 <import>true</import>
303 <export>false</export>
304 <type>int unsigned</type>
305 <html>
306 <type>Select</type>
307 </html>
308 <pseudoconstant>
309 <optionGroupName>pledge_status</optionGroupName>
310 </pseudoconstant>
311 <comment>Implicit foreign key to civicrm_option_values in the pledge_status option group.</comment>
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>
319 <field>
320 <name>is_test</name>
321 <uniqueName>pledge_is_test</uniqueName>
322 <import>true</import>
323 <title>Test</title>
324 <type>boolean</type>
325 <default>0</default>
326 <required>true</required>
327 <html>
328 <type>CheckBox</type>
329 </html>
330 </field>
331 <field>
332 <name>campaign_id</name>
333 <component>CiviCampaign</component>
334 <uniqueName>pledge_campaign_id</uniqueName>
335 <type>int unsigned</type>
336 <title>Campaign ID</title>
337 <import>true</import>
338 <comment>The campaign for which this pledge has been initiated.</comment>
339 <add>3.4</add>
340 <html>
341 <type>EntityRef</type>
342 <label>Campaign</label>
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>