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