Merge pull request #22138 from eileenmcnaughton/cust_edit
[civicrm-core.git] / CRM / Core / DAO / ActionSchedule.php
1 <?php
2
3 /**
4 * @package CRM
5 * @copyright CiviCRM LLC https://civicrm.org/licensing
6 *
7 * Generated from xml/schema/CRM/Core/ActionSchedule.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:35dfd5d26ce9445b37c831c51ccc5d7e)
10 */
11
12 /**
13 * Database access object for the ActionSchedule entity.
14 */
15 class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO {
16 const EXT = 'civicrm';
17 const TABLE_ADDED = '3.4';
18
19 /**
20 * Static instance to hold the table name.
21 *
22 * @var string
23 */
24 public static $_tableName = 'civicrm_action_schedule';
25
26 /**
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
28 *
29 * @var bool
30 */
31 public static $_log = FALSE;
32
33 /**
34 * @var int
35 */
36 public $id;
37
38 /**
39 * Name of the action(reminder)
40 *
41 * @var string
42 */
43 public $name;
44
45 /**
46 * Title of the action(reminder)
47 *
48 * @var string
49 */
50 public $title;
51
52 /**
53 * Recipient
54 *
55 * @var string
56 */
57 public $recipient;
58
59 /**
60 * Is this the recipient criteria limited to OR in addition to?
61 *
62 * @var bool
63 */
64 public $limit_to;
65
66 /**
67 * Entity value
68 *
69 * @var string
70 */
71 public $entity_value;
72
73 /**
74 * Entity status
75 *
76 * @var string
77 */
78 public $entity_status;
79
80 /**
81 * Reminder Interval.
82 *
83 * @var int
84 */
85 public $start_action_offset;
86
87 /**
88 * Time units for reminder.
89 *
90 * @var string
91 */
92 public $start_action_unit;
93
94 /**
95 * Reminder Action
96 *
97 * @var string
98 */
99 public $start_action_condition;
100
101 /**
102 * Entity date
103 *
104 * @var string
105 */
106 public $start_action_date;
107
108 /**
109 * @var bool
110 */
111 public $is_repeat;
112
113 /**
114 * Time units for repetition of reminder.
115 *
116 * @var string
117 */
118 public $repetition_frequency_unit;
119
120 /**
121 * Time interval for repeating the reminder.
122 *
123 * @var int
124 */
125 public $repetition_frequency_interval;
126
127 /**
128 * Time units till repetition of reminder.
129 *
130 * @var string
131 */
132 public $end_frequency_unit;
133
134 /**
135 * Time interval till repeating the reminder.
136 *
137 * @var int
138 */
139 public $end_frequency_interval;
140
141 /**
142 * Reminder Action till repeating the reminder.
143 *
144 * @var string
145 */
146 public $end_action;
147
148 /**
149 * Entity end date
150 *
151 * @var string
152 */
153 public $end_date;
154
155 /**
156 * Is this option active?
157 *
158 * @var bool
159 */
160 public $is_active;
161
162 /**
163 * Contact IDs to which reminder should be sent.
164 *
165 * @var string
166 */
167 public $recipient_manual;
168
169 /**
170 * listing based on recipient field.
171 *
172 * @var string
173 */
174 public $recipient_listing;
175
176 /**
177 * Body of the mailing in text format.
178 *
179 * @var longtext
180 */
181 public $body_text;
182
183 /**
184 * Body of the mailing in html format.
185 *
186 * @var longtext
187 */
188 public $body_html;
189
190 /**
191 * Content of the SMS text.
192 *
193 * @var longtext
194 */
195 public $sms_body_text;
196
197 /**
198 * Subject of mailing
199 *
200 * @var string
201 */
202 public $subject;
203
204 /**
205 * Record Activity for this reminder?
206 *
207 * @var bool
208 */
209 public $record_activity;
210
211 /**
212 * Name/ID of the mapping to use on this table
213 *
214 * @var string
215 */
216 public $mapping_id;
217
218 /**
219 * FK to Group
220 *
221 * @var int
222 */
223 public $group_id;
224
225 /**
226 * FK to the message template.
227 *
228 * @var int
229 */
230 public $msg_template_id;
231
232 /**
233 * FK to the message template.
234 *
235 * @var int
236 */
237 public $sms_template_id;
238
239 /**
240 * Date on which the reminder be sent.
241 *
242 * @var date
243 */
244 public $absolute_date;
245
246 /**
247 * Name in "from" field
248 *
249 * @var string
250 */
251 public $from_name;
252
253 /**
254 * Email address in "from" field
255 *
256 * @var string
257 */
258 public $from_email;
259
260 /**
261 * Send the message as email or sms or both.
262 *
263 * @var string
264 */
265 public $mode;
266
267 /**
268 * @var int
269 */
270 public $sms_provider_id;
271
272 /**
273 * Used for repeating entity
274 *
275 * @var string
276 */
277 public $used_for;
278
279 /**
280 * Used for multilingual installation
281 *
282 * @var string
283 */
284 public $filter_contact_language;
285
286 /**
287 * Used for multilingual installation
288 *
289 * @var string
290 */
291 public $communication_language;
292
293 /**
294 * When was the scheduled reminder created.
295 *
296 * @var timestamp
297 */
298 public $created_date;
299
300 /**
301 * When the reminder was created or modified.
302 *
303 * @var timestamp
304 */
305 public $modified_date;
306
307 /**
308 * Earliest date to consider start events from.
309 *
310 * @var timestamp
311 */
312 public $effective_start_date;
313
314 /**
315 * Latest date to consider end events from.
316 *
317 * @var timestamp
318 */
319 public $effective_end_date;
320
321 /**
322 * Class constructor.
323 */
324 public function __construct() {
325 $this->__table = 'civicrm_action_schedule';
326 parent::__construct();
327 }
328
329 /**
330 * Returns localized title of this entity.
331 *
332 * @param bool $plural
333 * Whether to return the plural version of the title.
334 */
335 public static function getEntityTitle($plural = FALSE) {
336 return $plural ? ts('Action Schedules') : ts('Action Schedule');
337 }
338
339 /**
340 * Returns foreign keys and entity references.
341 *
342 * @return array
343 * [CRM_Core_Reference_Interface]
344 */
345 public static function getReferenceColumns() {
346 if (!isset(Civi::$statics[__CLASS__]['links'])) {
347 Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
348 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'group_id', 'civicrm_group', 'id');
349 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'msg_template_id', 'civicrm_msg_template', 'id');
350 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'sms_template_id', 'civicrm_msg_template', 'id');
351 Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'sms_provider_id', 'civicrm_sms_provider', 'id');
352 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
353 }
354 return Civi::$statics[__CLASS__]['links'];
355 }
356
357 /**
358 * Returns all the column names of this table
359 *
360 * @return array
361 */
362 public static function &fields() {
363 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
364 Civi::$statics[__CLASS__]['fields'] = [
365 'id' => [
366 'name' => 'id',
367 'type' => CRM_Utils_Type::T_INT,
368 'title' => ts('Action Schedule ID'),
369 'required' => TRUE,
370 'where' => 'civicrm_action_schedule.id',
371 'table_name' => 'civicrm_action_schedule',
372 'entity' => 'ActionSchedule',
373 'bao' => 'CRM_Core_BAO_ActionSchedule',
374 'localizable' => 0,
375 'html' => [
376 'type' => 'Number',
377 ],
378 'readonly' => TRUE,
379 'add' => '3.4',
380 ],
381 'name' => [
382 'name' => 'name',
383 'type' => CRM_Utils_Type::T_STRING,
384 'title' => ts('Name'),
385 'description' => ts('Name of the action(reminder)'),
386 'maxlength' => 64,
387 'size' => CRM_Utils_Type::BIG,
388 'where' => 'civicrm_action_schedule.name',
389 'table_name' => 'civicrm_action_schedule',
390 'entity' => 'ActionSchedule',
391 'bao' => 'CRM_Core_BAO_ActionSchedule',
392 'localizable' => 0,
393 'add' => '3.4',
394 ],
395 'title' => [
396 'name' => 'title',
397 'type' => CRM_Utils_Type::T_STRING,
398 'title' => ts('Title'),
399 'description' => ts('Title of the action(reminder)'),
400 'maxlength' => 64,
401 'size' => CRM_Utils_Type::BIG,
402 'where' => 'civicrm_action_schedule.title',
403 'table_name' => 'civicrm_action_schedule',
404 'entity' => 'ActionSchedule',
405 'bao' => 'CRM_Core_BAO_ActionSchedule',
406 'localizable' => 0,
407 'add' => '3.4',
408 ],
409 'recipient' => [
410 'name' => 'recipient',
411 'type' => CRM_Utils_Type::T_STRING,
412 'title' => ts('Recipient'),
413 'description' => ts('Recipient'),
414 'maxlength' => 64,
415 'size' => CRM_Utils_Type::BIG,
416 'where' => 'civicrm_action_schedule.recipient',
417 'table_name' => 'civicrm_action_schedule',
418 'entity' => 'ActionSchedule',
419 'bao' => 'CRM_Core_BAO_ActionSchedule',
420 'localizable' => 0,
421 'html' => [
422 'label' => ts("Recipient"),
423 ],
424 'add' => '3.4',
425 ],
426 'limit_to' => [
427 'name' => 'limit_to',
428 'type' => CRM_Utils_Type::T_BOOLEAN,
429 'title' => ts('Limit To'),
430 'description' => ts('Is this the recipient criteria limited to OR in addition to?'),
431 'where' => 'civicrm_action_schedule.limit_to',
432 'table_name' => 'civicrm_action_schedule',
433 'entity' => 'ActionSchedule',
434 'bao' => 'CRM_Core_BAO_ActionSchedule',
435 'localizable' => 0,
436 'html' => [
437 'label' => ts("Limit To"),
438 ],
439 'add' => '4.4',
440 ],
441 'entity_value' => [
442 'name' => 'entity_value',
443 'type' => CRM_Utils_Type::T_STRING,
444 'title' => ts('Entity Value'),
445 'description' => ts('Entity value'),
446 'maxlength' => 255,
447 'size' => CRM_Utils_Type::HUGE,
448 'where' => 'civicrm_action_schedule.entity_value',
449 'table_name' => 'civicrm_action_schedule',
450 'entity' => 'ActionSchedule',
451 'bao' => 'CRM_Core_BAO_ActionSchedule',
452 'localizable' => 0,
453 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
454 'html' => [
455 'label' => ts("Entity value"),
456 ],
457 'add' => '3.4',
458 ],
459 'entity_status' => [
460 'name' => 'entity_status',
461 'type' => CRM_Utils_Type::T_STRING,
462 'title' => ts('Entity Status'),
463 'description' => ts('Entity status'),
464 'maxlength' => 64,
465 'size' => CRM_Utils_Type::BIG,
466 'where' => 'civicrm_action_schedule.entity_status',
467 'table_name' => 'civicrm_action_schedule',
468 'entity' => 'ActionSchedule',
469 'bao' => 'CRM_Core_BAO_ActionSchedule',
470 'localizable' => 0,
471 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
472 'html' => [
473 'label' => ts("Entity Status"),
474 ],
475 'add' => '3.4',
476 ],
477 'start_action_offset' => [
478 'name' => 'start_action_offset',
479 'type' => CRM_Utils_Type::T_INT,
480 'title' => ts('Start Action Offset'),
481 'description' => ts('Reminder Interval.'),
482 'where' => 'civicrm_action_schedule.start_action_offset',
483 'default' => '0',
484 'table_name' => 'civicrm_action_schedule',
485 'entity' => 'ActionSchedule',
486 'bao' => 'CRM_Core_BAO_ActionSchedule',
487 'localizable' => 0,
488 'html' => [
489 'label' => ts("Start Action Offset"),
490 ],
491 'add' => '3.4',
492 ],
493 'start_action_unit' => [
494 'name' => 'start_action_unit',
495 'type' => CRM_Utils_Type::T_STRING,
496 'title' => ts('Start Action Unit'),
497 'description' => ts('Time units for reminder.'),
498 'maxlength' => 8,
499 'size' => CRM_Utils_Type::EIGHT,
500 'where' => 'civicrm_action_schedule.start_action_unit',
501 'table_name' => 'civicrm_action_schedule',
502 'entity' => 'ActionSchedule',
503 'bao' => 'CRM_Core_BAO_ActionSchedule',
504 'localizable' => 0,
505 'html' => [
506 'type' => 'Select',
507 'label' => ts("Start Action Unit"),
508 ],
509 'pseudoconstant' => [
510 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
511 ],
512 'add' => '3.4',
513 ],
514 'start_action_condition' => [
515 'name' => 'start_action_condition',
516 'type' => CRM_Utils_Type::T_STRING,
517 'title' => ts('Start Action Condition'),
518 'description' => ts('Reminder Action'),
519 'maxlength' => 64,
520 'size' => CRM_Utils_Type::BIG,
521 'where' => 'civicrm_action_schedule.start_action_condition',
522 'table_name' => 'civicrm_action_schedule',
523 'entity' => 'ActionSchedule',
524 'bao' => 'CRM_Core_BAO_ActionSchedule',
525 'localizable' => 0,
526 'html' => [
527 'label' => ts("Start Action condition"),
528 ],
529 'add' => '3.4',
530 ],
531 'start_action_date' => [
532 'name' => 'start_action_date',
533 'type' => CRM_Utils_Type::T_STRING,
534 'title' => ts('Start Action Date'),
535 'description' => ts('Entity date'),
536 'maxlength' => 64,
537 'size' => CRM_Utils_Type::BIG,
538 'where' => 'civicrm_action_schedule.start_action_date',
539 'table_name' => 'civicrm_action_schedule',
540 'entity' => 'ActionSchedule',
541 'bao' => 'CRM_Core_BAO_ActionSchedule',
542 'localizable' => 0,
543 'html' => [
544 'label' => ts("Start Action Date"),
545 ],
546 'add' => '3.4',
547 ],
548 'is_repeat' => [
549 'name' => 'is_repeat',
550 'type' => CRM_Utils_Type::T_BOOLEAN,
551 'title' => ts('Repeat?'),
552 'where' => 'civicrm_action_schedule.is_repeat',
553 'default' => '0',
554 'table_name' => 'civicrm_action_schedule',
555 'entity' => 'ActionSchedule',
556 'bao' => 'CRM_Core_BAO_ActionSchedule',
557 'localizable' => 0,
558 'add' => '3.4',
559 ],
560 'repetition_frequency_unit' => [
561 'name' => 'repetition_frequency_unit',
562 'type' => CRM_Utils_Type::T_STRING,
563 'title' => ts('Repetition Frequency Unit'),
564 'description' => ts('Time units for repetition of reminder.'),
565 'maxlength' => 8,
566 'size' => CRM_Utils_Type::EIGHT,
567 'where' => 'civicrm_action_schedule.repetition_frequency_unit',
568 'table_name' => 'civicrm_action_schedule',
569 'entity' => 'ActionSchedule',
570 'bao' => 'CRM_Core_BAO_ActionSchedule',
571 'localizable' => 0,
572 'html' => [
573 'type' => 'Select',
574 'label' => ts("Repetition Frequency Unit"),
575 ],
576 'pseudoconstant' => [
577 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
578 ],
579 'add' => '3.4',
580 ],
581 'repetition_frequency_interval' => [
582 'name' => 'repetition_frequency_interval',
583 'type' => CRM_Utils_Type::T_INT,
584 'title' => ts('Repetition Frequency Interval'),
585 'description' => ts('Time interval for repeating the reminder.'),
586 'where' => 'civicrm_action_schedule.repetition_frequency_interval',
587 'default' => '0',
588 'table_name' => 'civicrm_action_schedule',
589 'entity' => 'ActionSchedule',
590 'bao' => 'CRM_Core_BAO_ActionSchedule',
591 'localizable' => 0,
592 'html' => [
593 'label' => ts("Repetition Frequency Interval"),
594 ],
595 'add' => '3.4',
596 ],
597 'end_frequency_unit' => [
598 'name' => 'end_frequency_unit',
599 'type' => CRM_Utils_Type::T_STRING,
600 'title' => ts('End Frequency Unit'),
601 'description' => ts('Time units till repetition of reminder.'),
602 'maxlength' => 8,
603 'size' => CRM_Utils_Type::EIGHT,
604 'where' => 'civicrm_action_schedule.end_frequency_unit',
605 'table_name' => 'civicrm_action_schedule',
606 'entity' => 'ActionSchedule',
607 'bao' => 'CRM_Core_BAO_ActionSchedule',
608 'localizable' => 0,
609 'html' => [
610 'type' => 'Select',
611 'label' => ts("End Frequency Unit"),
612 ],
613 'pseudoconstant' => [
614 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
615 ],
616 'add' => '3.4',
617 ],
618 'end_frequency_interval' => [
619 'name' => 'end_frequency_interval',
620 'type' => CRM_Utils_Type::T_INT,
621 'title' => ts('End Frequency Interval'),
622 'description' => ts('Time interval till repeating the reminder.'),
623 'where' => 'civicrm_action_schedule.end_frequency_interval',
624 'default' => '0',
625 'table_name' => 'civicrm_action_schedule',
626 'entity' => 'ActionSchedule',
627 'bao' => 'CRM_Core_BAO_ActionSchedule',
628 'localizable' => 0,
629 'html' => [
630 'label' => ts("End Frequency Interval"),
631 ],
632 'add' => '3.4',
633 ],
634 'end_action' => [
635 'name' => 'end_action',
636 'type' => CRM_Utils_Type::T_STRING,
637 'title' => ts('End Action'),
638 'description' => ts('Reminder Action till repeating the reminder.'),
639 'maxlength' => 32,
640 'size' => CRM_Utils_Type::MEDIUM,
641 'where' => 'civicrm_action_schedule.end_action',
642 'table_name' => 'civicrm_action_schedule',
643 'entity' => 'ActionSchedule',
644 'bao' => 'CRM_Core_BAO_ActionSchedule',
645 'localizable' => 0,
646 'html' => [
647 'label' => ts("End Action"),
648 ],
649 'add' => '3.4',
650 ],
651 'end_date' => [
652 'name' => 'end_date',
653 'type' => CRM_Utils_Type::T_STRING,
654 'title' => ts('End Date'),
655 'description' => ts('Entity end date'),
656 'maxlength' => 64,
657 'size' => CRM_Utils_Type::BIG,
658 'where' => 'civicrm_action_schedule.end_date',
659 'table_name' => 'civicrm_action_schedule',
660 'entity' => 'ActionSchedule',
661 'bao' => 'CRM_Core_BAO_ActionSchedule',
662 'localizable' => 0,
663 'html' => [
664 'label' => ts("End Date"),
665 ],
666 'add' => '3.4',
667 ],
668 'is_active' => [
669 'name' => 'is_active',
670 'type' => CRM_Utils_Type::T_BOOLEAN,
671 'title' => ts('Schedule is Active?'),
672 'description' => ts('Is this option active?'),
673 'where' => 'civicrm_action_schedule.is_active',
674 'default' => '1',
675 'table_name' => 'civicrm_action_schedule',
676 'entity' => 'ActionSchedule',
677 'bao' => 'CRM_Core_BAO_ActionSchedule',
678 'localizable' => 0,
679 'add' => '3.4',
680 ],
681 'recipient_manual' => [
682 'name' => 'recipient_manual',
683 'type' => CRM_Utils_Type::T_STRING,
684 'title' => ts('Recipient Manual'),
685 'description' => ts('Contact IDs to which reminder should be sent.'),
686 'maxlength' => 128,
687 'size' => CRM_Utils_Type::HUGE,
688 'where' => 'civicrm_action_schedule.recipient_manual',
689 'table_name' => 'civicrm_action_schedule',
690 'entity' => 'ActionSchedule',
691 'bao' => 'CRM_Core_BAO_ActionSchedule',
692 'localizable' => 0,
693 'serialize' => self::SERIALIZE_COMMA,
694 'add' => '3.4',
695 ],
696 'recipient_listing' => [
697 'name' => 'recipient_listing',
698 'type' => CRM_Utils_Type::T_STRING,
699 'title' => ts('Recipient Listing'),
700 'description' => ts('listing based on recipient field.'),
701 'maxlength' => 128,
702 'size' => CRM_Utils_Type::HUGE,
703 'where' => 'civicrm_action_schedule.recipient_listing',
704 'table_name' => 'civicrm_action_schedule',
705 'entity' => 'ActionSchedule',
706 'bao' => 'CRM_Core_BAO_ActionSchedule',
707 'localizable' => 0,
708 'add' => '4.1',
709 ],
710 'body_text' => [
711 'name' => 'body_text',
712 'type' => CRM_Utils_Type::T_LONGTEXT,
713 'title' => ts('Reminder Text'),
714 'description' => ts('Body of the mailing in text format.'),
715 'where' => 'civicrm_action_schedule.body_text',
716 'table_name' => 'civicrm_action_schedule',
717 'entity' => 'ActionSchedule',
718 'bao' => 'CRM_Core_BAO_ActionSchedule',
719 'localizable' => 0,
720 'add' => '3.4',
721 ],
722 'body_html' => [
723 'name' => 'body_html',
724 'type' => CRM_Utils_Type::T_LONGTEXT,
725 'title' => ts('Reminder HTML'),
726 'description' => ts('Body of the mailing in html format.'),
727 'where' => 'civicrm_action_schedule.body_html',
728 'table_name' => 'civicrm_action_schedule',
729 'entity' => 'ActionSchedule',
730 'bao' => 'CRM_Core_BAO_ActionSchedule',
731 'localizable' => 0,
732 'add' => '3.4',
733 ],
734 'sms_body_text' => [
735 'name' => 'sms_body_text',
736 'type' => CRM_Utils_Type::T_LONGTEXT,
737 'title' => ts('SMS Reminder Text'),
738 'description' => ts('Content of the SMS text.'),
739 'where' => 'civicrm_action_schedule.sms_body_text',
740 'table_name' => 'civicrm_action_schedule',
741 'entity' => 'ActionSchedule',
742 'bao' => 'CRM_Core_BAO_ActionSchedule',
743 'localizable' => 0,
744 'add' => '4.5',
745 ],
746 'subject' => [
747 'name' => 'subject',
748 'type' => CRM_Utils_Type::T_STRING,
749 'title' => ts('Reminder Subject'),
750 'description' => ts('Subject of mailing'),
751 'maxlength' => 128,
752 'size' => CRM_Utils_Type::HUGE,
753 'where' => 'civicrm_action_schedule.subject',
754 'table_name' => 'civicrm_action_schedule',
755 'entity' => 'ActionSchedule',
756 'bao' => 'CRM_Core_BAO_ActionSchedule',
757 'localizable' => 0,
758 'add' => '3.4',
759 ],
760 'record_activity' => [
761 'name' => 'record_activity',
762 'type' => CRM_Utils_Type::T_BOOLEAN,
763 'title' => ts('Record Activity for Reminder?'),
764 'description' => ts('Record Activity for this reminder?'),
765 'where' => 'civicrm_action_schedule.record_activity',
766 'default' => NULL,
767 'table_name' => 'civicrm_action_schedule',
768 'entity' => 'ActionSchedule',
769 'bao' => 'CRM_Core_BAO_ActionSchedule',
770 'localizable' => 0,
771 'add' => '3.4',
772 ],
773 'mapping_id' => [
774 'name' => 'mapping_id',
775 'type' => CRM_Utils_Type::T_STRING,
776 'title' => ts('Reminder Mapping'),
777 'description' => ts('Name/ID of the mapping to use on this table'),
778 'maxlength' => 64,
779 'size' => CRM_Utils_Type::BIG,
780 'where' => 'civicrm_action_schedule.mapping_id',
781 'table_name' => 'civicrm_action_schedule',
782 'entity' => 'ActionSchedule',
783 'bao' => 'CRM_Core_BAO_ActionSchedule',
784 'localizable' => 0,
785 'add' => '3.4',
786 ],
787 'group_id' => [
788 'name' => 'group_id',
789 'type' => CRM_Utils_Type::T_INT,
790 'title' => ts('Group ID'),
791 'description' => ts('FK to Group'),
792 'where' => 'civicrm_action_schedule.group_id',
793 'table_name' => 'civicrm_action_schedule',
794 'entity' => 'ActionSchedule',
795 'bao' => 'CRM_Core_BAO_ActionSchedule',
796 'localizable' => 0,
797 'FKClassName' => 'CRM_Contact_DAO_Group',
798 'html' => [
799 'type' => 'Select',
800 'label' => ts("Group"),
801 ],
802 'pseudoconstant' => [
803 'table' => 'civicrm_group',
804 'keyColumn' => 'id',
805 'labelColumn' => 'title',
806 ],
807 'add' => '3.4',
808 ],
809 'msg_template_id' => [
810 'name' => 'msg_template_id',
811 'type' => CRM_Utils_Type::T_INT,
812 'title' => ts('Message Template ID'),
813 'description' => ts('FK to the message template.'),
814 'where' => 'civicrm_action_schedule.msg_template_id',
815 'table_name' => 'civicrm_action_schedule',
816 'entity' => 'ActionSchedule',
817 'bao' => 'CRM_Core_BAO_ActionSchedule',
818 'localizable' => 0,
819 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
820 'html' => [
821 'label' => ts("Message Template"),
822 ],
823 'add' => NULL,
824 ],
825 'sms_template_id' => [
826 'name' => 'sms_template_id',
827 'type' => CRM_Utils_Type::T_INT,
828 'title' => ts('SMS Template ID'),
829 'description' => ts('FK to the message template.'),
830 'where' => 'civicrm_action_schedule.sms_template_id',
831 'table_name' => 'civicrm_action_schedule',
832 'entity' => 'ActionSchedule',
833 'bao' => 'CRM_Core_BAO_ActionSchedule',
834 'localizable' => 0,
835 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
836 'html' => [
837 'label' => ts("SMS Template"),
838 ],
839 'add' => NULL,
840 ],
841 'absolute_date' => [
842 'name' => 'absolute_date',
843 'type' => CRM_Utils_Type::T_DATE,
844 'title' => ts('Fixed Date for Reminder'),
845 'description' => ts('Date on which the reminder be sent.'),
846 'where' => 'civicrm_action_schedule.absolute_date',
847 'table_name' => 'civicrm_action_schedule',
848 'entity' => 'ActionSchedule',
849 'bao' => 'CRM_Core_BAO_ActionSchedule',
850 'localizable' => 0,
851 'add' => '4.1',
852 ],
853 'from_name' => [
854 'name' => 'from_name',
855 'type' => CRM_Utils_Type::T_STRING,
856 'title' => ts('Reminder from Name'),
857 'description' => ts('Name in "from" field'),
858 'maxlength' => 255,
859 'size' => CRM_Utils_Type::HUGE,
860 'where' => 'civicrm_action_schedule.from_name',
861 'table_name' => 'civicrm_action_schedule',
862 'entity' => 'ActionSchedule',
863 'bao' => 'CRM_Core_BAO_ActionSchedule',
864 'localizable' => 0,
865 'add' => '4.5',
866 ],
867 'from_email' => [
868 'name' => 'from_email',
869 'type' => CRM_Utils_Type::T_STRING,
870 'title' => ts('Reminder From Email'),
871 'description' => ts('Email address in "from" field'),
872 'maxlength' => 255,
873 'size' => CRM_Utils_Type::HUGE,
874 'where' => 'civicrm_action_schedule.from_email',
875 'table_name' => 'civicrm_action_schedule',
876 'entity' => 'ActionSchedule',
877 'bao' => 'CRM_Core_BAO_ActionSchedule',
878 'localizable' => 0,
879 'add' => '4.5',
880 ],
881 'mode' => [
882 'name' => 'mode',
883 'type' => CRM_Utils_Type::T_STRING,
884 'title' => ts('Message Mode'),
885 'description' => ts('Send the message as email or sms or both.'),
886 'maxlength' => 128,
887 'size' => CRM_Utils_Type::HUGE,
888 'where' => 'civicrm_action_schedule.mode',
889 'default' => 'Email',
890 'table_name' => 'civicrm_action_schedule',
891 'entity' => 'ActionSchedule',
892 'bao' => 'CRM_Core_BAO_ActionSchedule',
893 'localizable' => 0,
894 'html' => [
895 'type' => 'Select',
896 ],
897 'pseudoconstant' => [
898 'optionGroupName' => 'msg_mode',
899 'optionEditPath' => 'civicrm/admin/options/msg_mode',
900 ],
901 'add' => '4.5',
902 ],
903 'sms_provider_id' => [
904 'name' => 'sms_provider_id',
905 'type' => CRM_Utils_Type::T_INT,
906 'title' => ts('SMS Provider ID'),
907 'where' => 'civicrm_action_schedule.sms_provider_id',
908 'table_name' => 'civicrm_action_schedule',
909 'entity' => 'ActionSchedule',
910 'bao' => 'CRM_Core_BAO_ActionSchedule',
911 'localizable' => 0,
912 'FKClassName' => 'CRM_SMS_DAO_Provider',
913 'html' => [
914 'type' => 'Select',
915 'label' => ts("SMS Provider"),
916 ],
917 'add' => '4.5',
918 ],
919 'used_for' => [
920 'name' => 'used_for',
921 'type' => CRM_Utils_Type::T_STRING,
922 'title' => ts('Used For'),
923 'description' => ts('Used for repeating entity'),
924 'maxlength' => 64,
925 'size' => CRM_Utils_Type::BIG,
926 'where' => 'civicrm_action_schedule.used_for',
927 'table_name' => 'civicrm_action_schedule',
928 'entity' => 'ActionSchedule',
929 'bao' => 'CRM_Core_BAO_ActionSchedule',
930 'localizable' => 0,
931 'html' => [
932 'label' => ts("Used For"),
933 ],
934 'add' => '4.6',
935 ],
936 'filter_contact_language' => [
937 'name' => 'filter_contact_language',
938 'type' => CRM_Utils_Type::T_STRING,
939 'title' => ts('Filter Contact Language'),
940 'description' => ts('Used for multilingual installation'),
941 'maxlength' => 128,
942 'size' => CRM_Utils_Type::HUGE,
943 'where' => 'civicrm_action_schedule.filter_contact_language',
944 'table_name' => 'civicrm_action_schedule',
945 'entity' => 'ActionSchedule',
946 'bao' => 'CRM_Core_BAO_ActionSchedule',
947 'localizable' => 0,
948 'html' => [
949 'label' => ts("Filter Contact Language"),
950 ],
951 'add' => '4.7',
952 ],
953 'communication_language' => [
954 'name' => 'communication_language',
955 'type' => CRM_Utils_Type::T_STRING,
956 'title' => ts('Communication Language'),
957 'description' => ts('Used for multilingual installation'),
958 'maxlength' => 8,
959 'size' => CRM_Utils_Type::EIGHT,
960 'where' => 'civicrm_action_schedule.communication_language',
961 'table_name' => 'civicrm_action_schedule',
962 'entity' => 'ActionSchedule',
963 'bao' => 'CRM_Core_BAO_ActionSchedule',
964 'localizable' => 0,
965 'html' => [
966 'label' => ts("Communication Language"),
967 ],
968 'add' => '4.7',
969 ],
970 'action_schedule_created_date' => [
971 'name' => 'created_date',
972 'type' => CRM_Utils_Type::T_TIMESTAMP,
973 'title' => ts('Created Date'),
974 'description' => ts('When was the scheduled reminder created.'),
975 'required' => FALSE,
976 'where' => 'civicrm_action_schedule.created_date',
977 'export' => TRUE,
978 'default' => 'CURRENT_TIMESTAMP',
979 'table_name' => 'civicrm_action_schedule',
980 'entity' => 'ActionSchedule',
981 'bao' => 'CRM_Core_BAO_ActionSchedule',
982 'localizable' => 0,
983 'add' => '5.34',
984 ],
985 'modified_date' => [
986 'name' => 'modified_date',
987 'type' => CRM_Utils_Type::T_TIMESTAMP,
988 'title' => ts('Modified Date'),
989 'description' => ts('When the reminder was created or modified.'),
990 'required' => FALSE,
991 'where' => 'civicrm_action_schedule.modified_date',
992 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
993 'table_name' => 'civicrm_action_schedule',
994 'entity' => 'ActionSchedule',
995 'bao' => 'CRM_Core_BAO_ActionSchedule',
996 'localizable' => 0,
997 'html' => [
998 'label' => ts("Modified Date"),
999 ],
1000 'readonly' => TRUE,
1001 'add' => '5.34',
1002 ],
1003 'action_schedule_effective_start_date' => [
1004 'name' => 'effective_start_date',
1005 'type' => CRM_Utils_Type::T_TIMESTAMP,
1006 'title' => ts('Effective start date'),
1007 'description' => ts('Earliest date to consider start events from.'),
1008 'required' => FALSE,
1009 'where' => 'civicrm_action_schedule.effective_start_date',
1010 'export' => TRUE,
1011 'table_name' => 'civicrm_action_schedule',
1012 'entity' => 'ActionSchedule',
1013 'bao' => 'CRM_Core_BAO_ActionSchedule',
1014 'localizable' => 0,
1015 'add' => '5.34',
1016 ],
1017 'action_schedule_effective_end_date' => [
1018 'name' => 'effective_end_date',
1019 'type' => CRM_Utils_Type::T_TIMESTAMP,
1020 'title' => ts('Effective end date'),
1021 'description' => ts('Latest date to consider end events from.'),
1022 'required' => FALSE,
1023 'where' => 'civicrm_action_schedule.effective_end_date',
1024 'export' => TRUE,
1025 'table_name' => 'civicrm_action_schedule',
1026 'entity' => 'ActionSchedule',
1027 'bao' => 'CRM_Core_BAO_ActionSchedule',
1028 'localizable' => 0,
1029 'add' => '5.34',
1030 ],
1031 ];
1032 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
1033 }
1034 return Civi::$statics[__CLASS__]['fields'];
1035 }
1036
1037 /**
1038 * Return a mapping from field-name to the corresponding key (as used in fields()).
1039 *
1040 * @return array
1041 * Array(string $name => string $uniqueName).
1042 */
1043 public static function &fieldKeys() {
1044 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
1045 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
1046 }
1047 return Civi::$statics[__CLASS__]['fieldKeys'];
1048 }
1049
1050 /**
1051 * Returns the names of this table
1052 *
1053 * @return string
1054 */
1055 public static function getTableName() {
1056 return self::$_tableName;
1057 }
1058
1059 /**
1060 * Returns if this table needs to be logged
1061 *
1062 * @return bool
1063 */
1064 public function getLog() {
1065 return self::$_log;
1066 }
1067
1068 /**
1069 * Returns the list of fields that can be imported
1070 *
1071 * @param bool $prefix
1072 *
1073 * @return array
1074 */
1075 public static function &import($prefix = FALSE) {
1076 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_schedule', $prefix, []);
1077 return $r;
1078 }
1079
1080 /**
1081 * Returns the list of fields that can be exported
1082 *
1083 * @param bool $prefix
1084 *
1085 * @return array
1086 */
1087 public static function &export($prefix = FALSE) {
1088 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_schedule', $prefix, []);
1089 return $r;
1090 }
1091
1092 /**
1093 * Returns the list of indices
1094 *
1095 * @param bool $localize
1096 *
1097 * @return array
1098 */
1099 public static function indices($localize = TRUE) {
1100 $indices = [];
1101 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
1102 }
1103
1104 }