CRM-20312 regenerated DAO with localisation
[civicrm-core.git] / CRM / Pledge / DAO / PledgePayment.php
CommitLineData
e501603b
TO
1<?php
2/*
3+--------------------------------------------------------------------+
4| CiviCRM version 4.7 |
5+--------------------------------------------------------------------+
0f03f337 6| Copyright CiviCRM LLC (c) 2004-2017 |
e501603b
TO
7+--------------------------------------------------------------------+
8| This file is a part of CiviCRM. |
9| |
10| CiviCRM is free software; you can copy, modify, and distribute it |
11| under the terms of the GNU Affero General Public License |
12| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13| |
14| CiviCRM is distributed in the hope that it will be useful, but |
15| WITHOUT ANY WARRANTY; without even the implied warranty of |
16| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17| See the GNU Affero General Public License for more details. |
18| |
19| You should have received a copy of the GNU Affero General Public |
20| License and the CiviCRM Licensing Exception along |
21| with this program; if not, contact CiviCRM LLC |
22| at info[AT]civicrm[DOT]org. If you have questions about the |
23| GNU Affero General Public License or the licensing of CiviCRM, |
24| see the CiviCRM license FAQ at http://civicrm.org/licensing |
25+--------------------------------------------------------------------+
26*/
27/**
28 * @package CRM
0f03f337 29 * @copyright CiviCRM LLC (c) 2004-2017
e501603b
TO
30 *
31 * Generated from xml/schema/CRM/Pledge/PledgePayment.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
022785d8 33 * (GenCodeChecksum:09fc3071c5172648ed851790f09873b6)
e501603b
TO
34 */
35require_once 'CRM/Core/DAO.php';
36require_once 'CRM/Utils/Type.php';
f41f0342 37/**
38 * CRM_Pledge_DAO_PledgePayment constructor.
39 */
e501603b
TO
40class CRM_Pledge_DAO_PledgePayment extends CRM_Core_DAO {
41 /**
f41f0342 42 * Static instance to hold the table name.
e501603b
TO
43 *
44 * @var string
45 */
46 static $_tableName = 'civicrm_pledge_payment';
e501603b 47 /**
f41f0342 48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b
TO
49 *
50 * @var boolean
51 */
52 static $_log = true;
53 /**
54 *
55 * @var int unsigned
56 */
57 public $id;
58 /**
59 * FK to Pledge table
60 *
61 * @var int unsigned
62 */
63 public $pledge_id;
64 /**
65 * FK to contribution table.
66 *
67 * @var int unsigned
68 */
69 public $contribution_id;
70 /**
71 * Pledged amount for this payment (the actual contribution amount might be different).
72 *
73 * @var float
74 */
75 public $scheduled_amount;
76 /**
77 * Actual amount that is paid as the Pledged installment amount.
78 *
79 * @var float
80 */
81 public $actual_amount;
82 /**
83 * 3 character string, value from config setting or input via user.
84 *
85 * @var string
86 */
87 public $currency;
88 /**
89 * The date the pledge payment is supposed to happen.
90 *
91 * @var datetime
92 */
93 public $scheduled_date;
94 /**
95 * The date that the most recent payment reminder was sent.
96 *
97 * @var datetime
98 */
99 public $reminder_date;
100 /**
101 * The number of payment reminders sent.
102 *
103 * @var int unsigned
104 */
105 public $reminder_count;
106 /**
107 *
108 * @var int unsigned
109 */
110 public $status_id;
111 /**
f41f0342 112 * Class constructor.
e501603b
TO
113 */
114 function __construct() {
115 $this->__table = 'civicrm_pledge_payment';
116 parent::__construct();
117 }
118 /**
f41f0342 119 * Returns foreign keys and entity references.
e501603b
TO
120 *
121 * @return array
122 * [CRM_Core_Reference_Interface]
123 */
124 static function getReferenceColumns() {
346aaaba
TO
125 if (!isset(Civi::$statics[__CLASS__]['links'])) {
126 Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
127 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'pledge_id', 'civicrm_pledge', 'id');
128 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
129 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
e501603b 130 }
346aaaba 131 return Civi::$statics[__CLASS__]['links'];
e501603b
TO
132 }
133 /**
134 * Returns all the column names of this table
135 *
136 * @return array
137 */
138 static function &fields() {
346aaaba
TO
139 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
140 Civi::$statics[__CLASS__]['fields'] = array(
e501603b
TO
141 'pledge_payment_id' => array(
142 'name' => 'id',
143 'type' => CRM_Utils_Type::T_INT,
144 'title' => ts('Payment ID') ,
145 'required' => true,
146 'import' => true,
147 'where' => 'civicrm_pledge_payment.id',
148 'headerPattern' => '',
149 'dataPattern' => '',
150 'export' => true,
522a26c9 151 'table_name' => 'civicrm_pledge_payment',
152 'entity' => 'PledgePayment',
153 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 154 'localizable' => 0,
e501603b
TO
155 ) ,
156 'pledge_id' => array(
157 'name' => 'pledge_id',
158 'type' => CRM_Utils_Type::T_INT,
159 'title' => ts('Pledge') ,
160 'description' => 'FK to Pledge table',
161 'required' => true,
522a26c9 162 'table_name' => 'civicrm_pledge_payment',
163 'entity' => 'PledgePayment',
164 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 165 'localizable' => 0,
e501603b
TO
166 'FKClassName' => 'CRM_Pledge_DAO_Pledge',
167 ) ,
168 'contribution_id' => array(
169 'name' => 'contribution_id',
170 'type' => CRM_Utils_Type::T_INT,
171 'title' => ts('Contribution') ,
172 'description' => 'FK to contribution table.',
522a26c9 173 'table_name' => 'civicrm_pledge_payment',
174 'entity' => 'PledgePayment',
175 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 176 'localizable' => 0,
e501603b
TO
177 'FKClassName' => 'CRM_Contribute_DAO_Contribution',
178 ) ,
179 'pledge_payment_scheduled_amount' => array(
180 'name' => 'scheduled_amount',
181 'type' => CRM_Utils_Type::T_MONEY,
182 'title' => ts('Scheduled Amount') ,
183 'description' => 'Pledged amount for this payment (the actual contribution amount might be different).',
184 'required' => true,
185 'precision' => array(
186 20,
187 2
188 ) ,
189 'import' => true,
190 'where' => 'civicrm_pledge_payment.scheduled_amount',
191 'headerPattern' => '',
192 'dataPattern' => '',
193 'export' => true,
522a26c9 194 'table_name' => 'civicrm_pledge_payment',
195 'entity' => 'PledgePayment',
196 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 197 'localizable' => 0,
e501603b
TO
198 ) ,
199 'pledge_payment_actual_amount' => array(
200 'name' => 'actual_amount',
201 'type' => CRM_Utils_Type::T_MONEY,
202 'title' => ts('Actual Amount') ,
203 'description' => 'Actual amount that is paid as the Pledged installment amount.',
204 'precision' => array(
205 20,
206 2
207 ) ,
208 'import' => true,
209 'where' => 'civicrm_pledge_payment.actual_amount',
210 'headerPattern' => '',
211 'dataPattern' => '',
212 'export' => true,
522a26c9 213 'table_name' => 'civicrm_pledge_payment',
214 'entity' => 'PledgePayment',
215 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 216 'localizable' => 0,
e501603b
TO
217 ) ,
218 'currency' => array(
219 'name' => 'currency',
220 'type' => CRM_Utils_Type::T_STRING,
221 'title' => ts('Currency') ,
222 'description' => '3 character string, value from config setting or input via user.',
223 'maxlength' => 3,
224 'size' => CRM_Utils_Type::FOUR,
225 'default' => 'NULL',
522a26c9 226 'table_name' => 'civicrm_pledge_payment',
227 'entity' => 'PledgePayment',
228 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 229 'localizable' => 0,
e501603b
TO
230 'html' => array(
231 'type' => 'Select',
232 ) ,
233 'pseudoconstant' => array(
234 'table' => 'civicrm_currency',
235 'keyColumn' => 'name',
236 'labelColumn' => 'full_name',
237 'nameColumn' => 'name',
238 )
239 ) ,
240 'pledge_payment_scheduled_date' => array(
241 'name' => 'scheduled_date',
242 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
243 'title' => ts('Scheduled Date') ,
244 'description' => 'The date the pledge payment is supposed to happen.',
245 'required' => true,
246 'import' => true,
247 'where' => 'civicrm_pledge_payment.scheduled_date',
248 'headerPattern' => '',
249 'dataPattern' => '',
250 'export' => true,
522a26c9 251 'table_name' => 'civicrm_pledge_payment',
252 'entity' => 'PledgePayment',
253 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 254 'localizable' => 0,
e501603b
TO
255 ) ,
256 'pledge_payment_reminder_date' => array(
257 'name' => 'reminder_date',
258 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
259 'title' => ts('Last Reminder') ,
260 'description' => 'The date that the most recent payment reminder was sent.',
261 'import' => true,
262 'where' => 'civicrm_pledge_payment.reminder_date',
263 'headerPattern' => '',
264 'dataPattern' => '',
265 'export' => true,
522a26c9 266 'table_name' => 'civicrm_pledge_payment',
267 'entity' => 'PledgePayment',
268 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 269 'localizable' => 0,
e501603b
TO
270 ) ,
271 'pledge_payment_reminder_count' => array(
272 'name' => 'reminder_count',
273 'type' => CRM_Utils_Type::T_INT,
274 'title' => ts('Reminders Sent') ,
275 'description' => 'The number of payment reminders sent.',
276 'import' => true,
277 'where' => 'civicrm_pledge_payment.reminder_count',
278 'headerPattern' => '',
279 'dataPattern' => '',
280 'export' => true,
522a26c9 281 'table_name' => 'civicrm_pledge_payment',
282 'entity' => 'PledgePayment',
283 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 284 'localizable' => 0,
e501603b
TO
285 ) ,
286 'pledge_payment_status_id' => array(
287 'name' => 'status_id',
288 'type' => CRM_Utils_Type::T_INT,
289 'title' => ts('Payment Status') ,
290 'import' => true,
291 'where' => 'civicrm_pledge_payment.status_id',
292 'headerPattern' => '',
293 'dataPattern' => '',
294 'export' => false,
522a26c9 295 'table_name' => 'civicrm_pledge_payment',
296 'entity' => 'PledgePayment',
297 'bao' => 'CRM_Pledge_BAO_PledgePayment',
6a7e5e5d 298 'localizable' => 0,
e501603b
TO
299 'pseudoconstant' => array(
300 'optionGroupName' => 'contribution_status',
301 'optionEditPath' => 'civicrm/admin/options/contribution_status',
302 )
303 ) ,
304 );
346aaaba 305 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 306 }
346aaaba 307 return Civi::$statics[__CLASS__]['fields'];
e501603b
TO
308 }
309 /**
bd8e0b14 310 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
311 *
312 * @return array
bd8e0b14 313 * Array(string $name => string $uniqueName).
e501603b
TO
314 */
315 static function &fieldKeys() {
bd8e0b14
TO
316 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
317 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 318 }
bd8e0b14 319 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b
TO
320 }
321 /**
322 * Returns the names of this table
323 *
324 * @return string
325 */
326 static function getTableName() {
327 return self::$_tableName;
328 }
329 /**
330 * Returns if this table needs to be logged
331 *
332 * @return boolean
333 */
334 function getLog() {
335 return self::$_log;
336 }
337 /**
338 * Returns the list of fields that can be imported
339 *
340 * @param bool $prefix
341 *
342 * @return array
343 */
344 static function &import($prefix = false) {
60808919
TO
345 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'pledge_payment', $prefix, array());
346 return $r;
e501603b
TO
347 }
348 /**
349 * Returns the list of fields that can be exported
350 *
351 * @param bool $prefix
352 *
353 * @return array
354 */
355 static function &export($prefix = false) {
60808919
TO
356 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'pledge_payment', $prefix, array());
357 return $r;
e501603b
TO
358 }
359}