Mailing - Rename DAO files for better short names
authorColeman Watts <coleman@civicrm.org>
Wed, 16 Nov 2022 19:10:46 +0000 (14:10 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 17 Nov 2022 17:28:21 +0000 (12:28 -0500)
60 files changed:
CRM/Contact/BAO/Group.php
CRM/Core/DAO/AllCoreTables.data.php
CRM/Mailing/BAO/Query.php
CRM/Mailing/BAO/Recipients.php
CRM/Mailing/DAO/MailingRecipients.php [new file with mode: 0644]
CRM/Mailing/DAO/Recipients.php
CRM/Mailing/Event/BAO/Bounce.php
CRM/Mailing/Event/BAO/Confirm.php
CRM/Mailing/Event/BAO/Delivered.php
CRM/Mailing/Event/BAO/Forward.php
CRM/Mailing/Event/BAO/Opened.php
CRM/Mailing/Event/BAO/Queue.php
CRM/Mailing/Event/BAO/Reply.php
CRM/Mailing/Event/BAO/Subscribe.php
CRM/Mailing/Event/BAO/TrackableURLOpen.php
CRM/Mailing/Event/BAO/Unsubscribe.php
CRM/Mailing/Event/DAO/Bounce.php
CRM/Mailing/Event/DAO/Confirm.php
CRM/Mailing/Event/DAO/Delivered.php
CRM/Mailing/Event/DAO/Forward.php
CRM/Mailing/Event/DAO/MailingEventBounce.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventClickThrough.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventConfirm.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventDelivered.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventForward.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventOpened.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventQueue.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventReply.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventSubscribe.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/MailingEventUnsubscribe.php [new file with mode: 0644]
CRM/Mailing/Event/DAO/Opened.php
CRM/Mailing/Event/DAO/Queue.php
CRM/Mailing/Event/DAO/Reply.php
CRM/Mailing/Event/DAO/Subscribe.php
CRM/Mailing/Event/DAO/TrackableURLOpen.php
CRM/Mailing/Event/DAO/Unsubscribe.php
CRM/Mailing/Form/ForwardMailing.php
CRM/Report/Form/Mailing/Clicks.php
CRM/Report/Form/Mailing/Detail.php
CRM/Report/Form/Mailing/Opened.php
CRM/Utils/VersionCheck.php
api/v3/Mailing.php
api/v3/utils.php
ext/flexmailer/src/FlexMailerTask.php
tests/phpunit/CRM/Core/PseudoConstantTest.php
tests/phpunit/api/v3/MailingTest.php
xml/schema/Mailing/Event/MailingEventBounce.xml [moved from xml/schema/Mailing/Event/Bounce.xml with 98% similarity]
xml/schema/Mailing/Event/MailingEventClickThrough.xml [moved from xml/schema/Mailing/Event/TrackableURLOpen.xml with 97% similarity]
xml/schema/Mailing/Event/MailingEventConfirm.xml [moved from xml/schema/Mailing/Event/Confirm.xml with 97% similarity]
xml/schema/Mailing/Event/MailingEventDelivered.xml [moved from xml/schema/Mailing/Event/Delivered.xml with 97% similarity]
xml/schema/Mailing/Event/MailingEventForward.xml [moved from xml/schema/Mailing/Event/Forward.xml with 97% similarity]
xml/schema/Mailing/Event/MailingEventOpened.xml [moved from xml/schema/Mailing/Event/Opened.xml with 97% similarity]
xml/schema/Mailing/Event/MailingEventQueue.xml [moved from xml/schema/Mailing/Event/Queue.xml with 98% similarity]
xml/schema/Mailing/Event/MailingEventReply.xml [moved from xml/schema/Mailing/Event/Reply.xml with 97% similarity]
xml/schema/Mailing/Event/MailingEventSubscribe.xml [moved from xml/schema/Mailing/Event/Subscribe.xml with 98% similarity]
xml/schema/Mailing/Event/MailingEventUnsubscribe.xml [moved from xml/schema/Mailing/Event/Unsubscribe.xml with 97% similarity]
xml/schema/Mailing/Event/files.xml
xml/schema/Mailing/MailingComponent.xml [moved from xml/schema/Mailing/Component.xml with 100% similarity]
xml/schema/Mailing/MailingRecipients.xml [moved from xml/schema/Mailing/Recipients.xml with 94% similarity]
xml/schema/Mailing/files.xml

index 665b7f997302a771957d7e5a65273d20ac705bf7..15ce4f712845b372faba775acb383511f6725b8b 100644 (file)
@@ -52,7 +52,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
 
     // added for CRM-1631 and CRM-1794
     // delete all subscribed mails with the selected group id
-    $subscribe = new CRM_Mailing_Event_DAO_Subscribe();
+    $subscribe = new CRM_Mailing_Event_DAO_MailingEventSubscribe();
     $subscribe->group_id = $id;
     $subscribe->delete();
 
index 872b1cddea28b99fa97c42fec3f159951548ff81..456041dd3f3b279dc0d385f1aee7fd4b6f40e6f5 100644 (file)
@@ -432,14 +432,14 @@ return [
     'class' => 'CRM_Contact_DAO_GroupOrganization',
     'table' => 'civicrm_group_organization',
   ],
-  'CRM_Mailing_Event_DAO_Subscribe' => [
-    'name' => 'Subscribe',
-    'class' => 'CRM_Mailing_Event_DAO_Subscribe',
+  'CRM_Mailing_Event_DAO_MailingEventSubscribe' => [
+    'name' => 'MailingEventSubscribe',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventSubscribe',
     'table' => 'civicrm_mailing_event_subscribe',
   ],
-  'CRM_Mailing_Event_DAO_Confirm' => [
-    'name' => 'Confirm',
-    'class' => 'CRM_Mailing_Event_DAO_Confirm',
+  'CRM_Mailing_Event_DAO_MailingEventConfirm' => [
+    'name' => 'MailingEventConfirm',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventConfirm',
     'table' => 'civicrm_mailing_event_confirm',
   ],
   'CRM_Contribute_DAO_ContributionPage' => [
@@ -602,9 +602,9 @@ return [
     'class' => 'CRM_Mailing_DAO_MailingJob',
     'table' => 'civicrm_mailing_job',
   ],
-  'CRM_Mailing_DAO_Recipients' => [
-    'name' => 'Recipients',
-    'class' => 'CRM_Mailing_DAO_Recipients',
+  'CRM_Mailing_DAO_MailingRecipients' => [
+    'name' => 'MailingRecipients',
+    'class' => 'CRM_Mailing_DAO_MailingRecipients',
     'table' => 'civicrm_mailing_recipients',
   ],
   'CRM_Mailing_DAO_Spool' => [
@@ -612,44 +612,44 @@ return [
     'class' => 'CRM_Mailing_DAO_Spool',
     'table' => 'civicrm_mailing_spool',
   ],
-  'CRM_Mailing_Event_DAO_Queue' => [
+  'CRM_Mailing_Event_DAO_MailingEventQueue' => [
     'name' => 'MailingEventQueue',
-    'class' => 'CRM_Mailing_Event_DAO_Queue',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
     'table' => 'civicrm_mailing_event_queue',
   ],
-  'CRM_Mailing_Event_DAO_Bounce' => [
-    'name' => 'Bounce',
-    'class' => 'CRM_Mailing_Event_DAO_Bounce',
+  'CRM_Mailing_Event_DAO_MailingEventBounce' => [
+    'name' => 'MailingEventBounce',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventBounce',
     'table' => 'civicrm_mailing_event_bounce',
   ],
-  'CRM_Mailing_Event_DAO_Delivered' => [
-    'name' => 'Delivered',
-    'class' => 'CRM_Mailing_Event_DAO_Delivered',
+  'CRM_Mailing_Event_DAO_MailingEventDelivered' => [
+    'name' => 'MailingEventDelivered',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventDelivered',
     'table' => 'civicrm_mailing_event_delivered',
   ],
-  'CRM_Mailing_Event_DAO_Forward' => [
-    'name' => 'Forward',
-    'class' => 'CRM_Mailing_Event_DAO_Forward',
+  'CRM_Mailing_Event_DAO_MailingEventForward' => [
+    'name' => 'MailingEventForward',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventForward',
     'table' => 'civicrm_mailing_event_forward',
   ],
-  'CRM_Mailing_Event_DAO_Opened' => [
-    'name' => 'Opened',
-    'class' => 'CRM_Mailing_Event_DAO_Opened',
+  'CRM_Mailing_Event_DAO_MailingEventOpened' => [
+    'name' => 'MailingEventOpened',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventOpened',
     'table' => 'civicrm_mailing_event_opened',
   ],
-  'CRM_Mailing_Event_DAO_Reply' => [
-    'name' => 'Reply',
-    'class' => 'CRM_Mailing_Event_DAO_Reply',
+  'CRM_Mailing_Event_DAO_MailingEventReply' => [
+    'name' => 'MailingEventReply',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventReply',
     'table' => 'civicrm_mailing_event_reply',
   ],
-  'CRM_Mailing_Event_DAO_TrackableURLOpen' => [
-    'name' => 'TrackableURLOpen',
-    'class' => 'CRM_Mailing_Event_DAO_TrackableURLOpen',
+  'CRM_Mailing_Event_DAO_MailingEventClickThrough' => [
+    'name' => 'MailingEventClickThrough',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventClickThrough',
     'table' => 'civicrm_mailing_event_trackable_url_open',
   ],
-  'CRM_Mailing_Event_DAO_Unsubscribe' => [
-    'name' => 'Unsubscribe',
-    'class' => 'CRM_Mailing_Event_DAO_Unsubscribe',
+  'CRM_Mailing_Event_DAO_MailingEventUnsubscribe' => [
+    'name' => 'MailingEventUnsubscribe',
+    'class' => 'CRM_Mailing_Event_DAO_MailingEventUnsubscribe',
     'table' => 'civicrm_mailing_event_unsubscribe',
   ],
   'CRM_Contribute_DAO_ContributionRecur' => [
index e5440a829599e6d92c7628947f810bd73c5018c2..c14c361b1ceb9c380cad91a6a9fdef27dfbf3900 100644 (file)
@@ -309,7 +309,7 @@ class CRM_Mailing_BAO_Query {
           'civicrm_mailing_event_bounce',
           'bounce_type_id',
           ts('Bounce type(s)'),
-          CRM_Core_PseudoConstant::get('CRM_Mailing_Event_DAO_Bounce', 'bounce_type_id', [
+          CRM_Core_PseudoConstant::get('CRM_Mailing_Event_DAO_MailingEventBounce', 'bounce_type_id', [
             'keyColumn' => 'id',
             'labelColumn' => 'name',
           ])
@@ -416,7 +416,7 @@ class CRM_Mailing_BAO_Query {
     $form->addElement('select', 'mailing_job_status', ts('Mailing Job Status'), $mailingJobStatuses, FALSE);
 
     $mailingBounceTypes = CRM_Core_PseudoConstant::get(
-      'CRM_Mailing_Event_DAO_Bounce', 'bounce_type_id',
+      'CRM_Mailing_Event_DAO_MailingEventBounce', 'bounce_type_id',
       ['keyColumn' => 'id', 'labelColumn' => 'name']
     );
     $form->add('select', 'mailing_bounce_types', ts('Bounce Types'), $mailingBounceTypes, FALSE,
index b904aa952e72ab41213f855067cc7cbfaafb7e29..00cc93f408d2968f7d625ee46647536cdbfedf3e 100644 (file)
@@ -14,7 +14,7 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-class CRM_Mailing_BAO_Recipients extends CRM_Mailing_DAO_Recipients {
+class CRM_Mailing_BAO_Recipients extends CRM_Mailing_DAO_MailingRecipients {
 
   /**
    * @param int $mailingID
diff --git a/CRM/Mailing/DAO/MailingRecipients.php b/CRM/Mailing/DAO/MailingRecipients.php
new file mode 100644 (file)
index 0000000..25d6fad
--- /dev/null
@@ -0,0 +1,278 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/MailingRecipients.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:84f79faf0301cb3922cf90e901afd937)
+ */
+
+/**
+ * Database access object for the MailingRecipients entity.
+ */
+class CRM_Mailing_DAO_MailingRecipients extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_recipients';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * The ID of the mailing this Job will send.
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $mailing_id;
+
+  /**
+   * FK to Contact
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $contact_id;
+
+  /**
+   * FK to Email
+   *
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $email_id;
+
+  /**
+   * FK to Phone
+   *
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $phone_id;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_recipients';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Recipients') : ts('Mailing Recipient');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'mailing_id', 'civicrm_mailing', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'email_id', 'civicrm_email', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'phone_id', 'civicrm_phone', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Mailing Recipients ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_recipients.id',
+          'table_name' => 'civicrm_mailing_recipients',
+          'entity' => 'MailingRecipients',
+          'bao' => 'CRM_Mailing_DAO_MailingRecipients',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'mailing_id' => [
+          'name' => 'mailing_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Mailing ID'),
+          'description' => ts('The ID of the mailing this Job will send.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_recipients.mailing_id',
+          'table_name' => 'civicrm_mailing_recipients',
+          'entity' => 'MailingRecipients',
+          'bao' => 'CRM_Mailing_DAO_MailingRecipients',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_DAO_Mailing',
+          'html' => [
+            'label' => ts("Mailing"),
+          ],
+          'add' => NULL,
+        ],
+        'contact_id' => [
+          'name' => 'contact_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Recipient ID'),
+          'description' => ts('FK to Contact'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_recipients.contact_id',
+          'table_name' => 'civicrm_mailing_recipients',
+          'entity' => 'MailingRecipients',
+          'bao' => 'CRM_Mailing_DAO_MailingRecipients',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Contact_DAO_Contact',
+          'html' => [
+            'label' => ts("Recipient"),
+          ],
+          'add' => NULL,
+        ],
+        'email_id' => [
+          'name' => 'email_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Email ID'),
+          'description' => ts('FK to Email'),
+          'where' => 'civicrm_mailing_recipients.email_id',
+          'default' => NULL,
+          'table_name' => 'civicrm_mailing_recipients',
+          'entity' => 'MailingRecipients',
+          'bao' => 'CRM_Mailing_DAO_MailingRecipients',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Core_DAO_Email',
+          'html' => [
+            'label' => ts("Email"),
+          ],
+          'add' => NULL,
+        ],
+        'phone_id' => [
+          'name' => 'phone_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Phone ID'),
+          'description' => ts('FK to Phone'),
+          'where' => 'civicrm_mailing_recipients.phone_id',
+          'default' => NULL,
+          'table_name' => 'civicrm_mailing_recipients',
+          'entity' => 'MailingRecipients',
+          'bao' => 'CRM_Mailing_DAO_MailingRecipients',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Core_DAO_Phone',
+          'html' => [
+            'label' => ts("Phone"),
+          ],
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_recipients', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_recipients', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
index b2da3f8a5693f124bbeeeb41a11d085c2eb2f289..1d18586d630af522a3a4bd560048058f3ffaf3d9 100644 (file)
@@ -1,278 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Recipients.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:9e621bb126085835039b2cf250f369c3)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Recipients entity.
- */
-class CRM_Mailing_DAO_Recipients extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_recipients';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * The ID of the mailing this Job will send.
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $mailing_id;
-
-  /**
-   * FK to Contact
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $contact_id;
-
-  /**
-   * FK to Email
-   *
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $email_id;
-
-  /**
-   * FK to Phone
-   *
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $phone_id;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_recipients';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Recipients') : ts('Recipient');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'mailing_id', 'civicrm_mailing', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'email_id', 'civicrm_email', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'phone_id', 'civicrm_phone', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Mailing Recipients ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_recipients.id',
-          'table_name' => 'civicrm_mailing_recipients',
-          'entity' => 'Recipients',
-          'bao' => 'CRM_Mailing_BAO_Recipients',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'mailing_id' => [
-          'name' => 'mailing_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Mailing ID'),
-          'description' => ts('The ID of the mailing this Job will send.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_recipients.mailing_id',
-          'table_name' => 'civicrm_mailing_recipients',
-          'entity' => 'Recipients',
-          'bao' => 'CRM_Mailing_BAO_Recipients',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_DAO_Mailing',
-          'html' => [
-            'label' => ts("Mailing"),
-          ],
-          'add' => NULL,
-        ],
-        'contact_id' => [
-          'name' => 'contact_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Recipient ID'),
-          'description' => ts('FK to Contact'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_recipients.contact_id',
-          'table_name' => 'civicrm_mailing_recipients',
-          'entity' => 'Recipients',
-          'bao' => 'CRM_Mailing_BAO_Recipients',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Contact_DAO_Contact',
-          'html' => [
-            'label' => ts("Recipient"),
-          ],
-          'add' => NULL,
-        ],
-        'email_id' => [
-          'name' => 'email_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Email ID'),
-          'description' => ts('FK to Email'),
-          'where' => 'civicrm_mailing_recipients.email_id',
-          'default' => NULL,
-          'table_name' => 'civicrm_mailing_recipients',
-          'entity' => 'Recipients',
-          'bao' => 'CRM_Mailing_BAO_Recipients',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Core_DAO_Email',
-          'html' => [
-            'label' => ts("Email"),
-          ],
-          'add' => NULL,
-        ],
-        'phone_id' => [
-          'name' => 'phone_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Phone ID'),
-          'description' => ts('FK to Phone'),
-          'where' => 'civicrm_mailing_recipients.phone_id',
-          'default' => NULL,
-          'table_name' => 'civicrm_mailing_recipients',
-          'entity' => 'Recipients',
-          'bao' => 'CRM_Mailing_BAO_Recipients',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Core_DAO_Phone',
-          'html' => [
-            'label' => ts("Phone"),
-          ],
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_recipients', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_recipients', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_DAO_MailingRecipients', 'CRM_Mailing_DAO_Recipients');
index 1b6d588ea680f29a9e0cb80992e4739de7e0518d..5ac65e6c5b4aeddc40c826d062838c404743ce87 100644 (file)
@@ -14,7 +14,7 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce {
+class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_MailingEventBounce {
 
   /**
    * Create a new bounce event, update the email address if necessary
index 8a446143d228c225fa014980d70b1a1ab0e30c60..c3cb86615eed19cef21f59b7a68eec349ecd5e5d 100644 (file)
@@ -22,7 +22,7 @@ require_once 'Mail/mime.php';
 /**
  * Class CRM_Mailing_Event_BAO_Confirm
  */
-class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm {
+class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_MailingEventConfirm {
 
   /**
    * Confirm a pending subscription.
index 86fa110bd04c3c8610323ec9d26d570e765d143b..efa55f56940a07bb8545959d0aa78ed21e5af385 100644 (file)
@@ -14,7 +14,7 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-class CRM_Mailing_Event_BAO_Delivered extends CRM_Mailing_Event_DAO_Delivered {
+class CRM_Mailing_Event_BAO_Delivered extends CRM_Mailing_Event_DAO_MailingEventDelivered {
 
   /**
    * Create a new delivery event.
index e6ca6bc2ccba5339adf265be75b95d82532e37e6..cb881228bb64c3574aba088777f439d31c9a9525 100644 (file)
@@ -14,7 +14,7 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-class CRM_Mailing_Event_BAO_Forward extends CRM_Mailing_Event_DAO_Forward {
+class CRM_Mailing_Event_BAO_Forward extends CRM_Mailing_Event_DAO_MailingEventForward {
 
   /**
    * Create a new forward event, create a new contact if necessary
index 4242251291494c5391db43a758e9c00f48650537..4ba09ab182941c21b45d81b9af989b7e9e5bd71c 100644 (file)
@@ -14,7 +14,7 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-class CRM_Mailing_Event_BAO_Opened extends CRM_Mailing_Event_DAO_Opened {
+class CRM_Mailing_Event_BAO_Opened extends CRM_Mailing_Event_DAO_MailingEventOpened {
 
   /**
    * Register an open event.
index 22cfe10fa4ee050e4bf3e06d4633f05d6225ef44..00a7bc6c035783ffd5479fecde0011da55d75e00 100644 (file)
@@ -14,7 +14,7 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-class CRM_Mailing_Event_BAO_Queue extends CRM_Mailing_Event_DAO_Queue {
+class CRM_Mailing_Event_BAO_Queue extends CRM_Mailing_Event_DAO_MailingEventQueue {
 
   /**
    * Queue a new recipient.
index 6ecf68e6ad48c525f4d5b00a9d6e969022d32d42..e70581d2311217161f579450c0676eddbfc1cc04 100644 (file)
@@ -20,7 +20,7 @@ require_once 'Mail/mime.php';
 /**
  * Class CRM_Mailing_Event_BAO_Reply
  */
-class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
+class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_MailingEventReply {
 
   /**
    * Register a reply event.
@@ -199,7 +199,7 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply {
 
     $contacts = CRM_Contact_DAO_Contact::getTableName();
     $email = CRM_Core_DAO_Email::getTableName();
-    $queue = CRM_Mailing_Event_DAO_Queue::getTableName();
+    $queue = CRM_Mailing_Event_DAO_MailingEventQueue::getTableName();
 
     $eq = new CRM_Core_DAO();
     $eq->query(
index 7c59da9d6da1ded9493c866984693086f690714a..df37dd9e832e110fc6eecc353e8e284518080651 100644 (file)
@@ -23,7 +23,7 @@ require_once 'Mail/mime.php';
 /**
  * Class CRM_Mailing_Event_BAO_Subscribe
  */
-class CRM_Mailing_Event_BAO_Subscribe extends CRM_Mailing_Event_DAO_Subscribe {
+class CRM_Mailing_Event_BAO_Subscribe extends CRM_Mailing_Event_DAO_MailingEventSubscribe {
 
   /**
    * Register a subscription event.  Create a new contact if one does not
index 95ea3f6920e4c88a9402aa47b169cf0c1d53741a..1220f784b20d47727c09ad838db0dbbc5c775521 100644 (file)
@@ -14,7 +14,7 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-class CRM_Mailing_Event_BAO_TrackableURLOpen extends CRM_Mailing_Event_DAO_TrackableURLOpen {
+class CRM_Mailing_Event_BAO_TrackableURLOpen extends CRM_Mailing_Event_DAO_MailingEventClickThrough {
 
   /**
    * Track a click-through and return the URL to redirect.
index f0fffc481413a879c880b841ec1b74df598056b9..5b53f914efb5a9514f1a8c09ce03970ad9832f03 100644 (file)
@@ -22,7 +22,7 @@ require_once 'Mail/mime.php';
 /**
  * Class CRM_Mailing_Event_BAO_Unsubscribe
  */
-class CRM_Mailing_Event_BAO_Unsubscribe extends CRM_Mailing_Event_DAO_Unsubscribe {
+class CRM_Mailing_Event_BAO_Unsubscribe extends CRM_Mailing_Event_DAO_MailingEventUnsubscribe {
 
   /**
    * Unsubscribe a contact from the domain.
index 5815113eea63005e8a8addef256cb3912725d5b5..27572dbdc101a1fb0174cd27e08c1ec8f467b549 100644 (file)
@@ -1,272 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Bounce.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:0039dfc45bc3614afea343b03495ef2f)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Bounce entity.
- */
-class CRM_Mailing_Event_DAO_Bounce extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_bounce';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to EventQueue
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_queue_id;
-
-  /**
-   * What type of bounce was it?
-   *
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $bounce_type_id;
-
-  /**
-   * The reason the email bounced.
-   *
-   * @var string|null
-   *   (SQL type: varchar(255))
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $bounce_reason;
-
-  /**
-   * When this bounce event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_bounce';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Mailing Bounce Events') : ts('Mailing Bounce Event');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Bounce ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_bounce.id',
-          'table_name' => 'civicrm_mailing_event_bounce',
-          'entity' => 'Bounce',
-          'bao' => 'CRM_Mailing_Event_BAO_Bounce',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_queue_id' => [
-          'name' => 'event_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Queue ID'),
-          'description' => ts('FK to EventQueue'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_bounce.event_queue_id',
-          'table_name' => 'civicrm_mailing_event_bounce',
-          'entity' => 'Bounce',
-          'bao' => 'CRM_Mailing_Event_BAO_Bounce',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Event Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'bounce_type_id' => [
-          'name' => 'bounce_type_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Bounce Type'),
-          'description' => ts('What type of bounce was it?'),
-          'where' => 'civicrm_mailing_event_bounce.bounce_type_id',
-          'table_name' => 'civicrm_mailing_event_bounce',
-          'entity' => 'Bounce',
-          'bao' => 'CRM_Mailing_Event_BAO_Bounce',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Select',
-          ],
-          'pseudoconstant' => [
-            'table' => 'civicrm_mailing_bounce_type',
-            'keyColumn' => 'id',
-            'labelColumn' => 'name',
-          ],
-          'add' => NULL,
-        ],
-        'bounce_reason' => [
-          'name' => 'bounce_reason',
-          'type' => CRM_Utils_Type::T_STRING,
-          'title' => ts('Bounce Reason'),
-          'description' => ts('The reason the email bounced.'),
-          'maxlength' => 255,
-          'size' => CRM_Utils_Type::HUGE,
-          'where' => 'civicrm_mailing_event_bounce.bounce_reason',
-          'table_name' => 'civicrm_mailing_event_bounce',
-          'entity' => 'Bounce',
-          'bao' => 'CRM_Mailing_Event_BAO_Bounce',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Timestamp'),
-          'description' => ts('When this bounce event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_bounce.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_bounce',
-          'entity' => 'Bounce',
-          'bao' => 'CRM_Mailing_Event_BAO_Bounce',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_bounce', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_bounce', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventBounce', 'CRM_Mailing_Event_DAO_Bounce');
index c48eaa085f5cc121e0d4a0782ddee841b7878715..8acb2e61d6b1576ccb6385f1202710c728eba89b 100644 (file)
@@ -1,220 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Confirm.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:541fa1d03371978c7f6b627092a5f905)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Confirm entity.
- */
-class CRM_Mailing_Event_DAO_Confirm extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_confirm';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to civicrm_mailing_event_subscribe
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_subscribe_id;
-
-  /**
-   * When this confirmation event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_confirm';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Mailing Contribution Events') : ts('Mailing Confirmation Event');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_subscribe_id', 'civicrm_mailing_event_subscribe', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Mailing Confirmation ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_confirm.id',
-          'table_name' => 'civicrm_mailing_event_confirm',
-          'entity' => 'Confirm',
-          'bao' => 'CRM_Mailing_Event_BAO_Confirm',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_subscribe_id' => [
-          'name' => 'event_subscribe_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Mailing Subscribe ID'),
-          'description' => ts('FK to civicrm_mailing_event_subscribe'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_confirm.event_subscribe_id',
-          'table_name' => 'civicrm_mailing_event_confirm',
-          'entity' => 'Confirm',
-          'bao' => 'CRM_Mailing_Event_BAO_Confirm',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Subscribe',
-          'html' => [
-            'label' => ts("Mailing Subscribe"),
-          ],
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Confirm Timestamp'),
-          'description' => ts('When this confirmation event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_confirm.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_confirm',
-          'entity' => 'Confirm',
-          'bao' => 'CRM_Mailing_Event_BAO_Confirm',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_confirm', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_confirm', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventConfirm', 'CRM_Mailing_Event_DAO_Confirm');
index d7fb0708f8db7260f9d28919e19930ffa4874f6b..bfad91a0bbd43a889f284f17239490f951dc90b3 100644 (file)
@@ -1,220 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Delivered.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:296ca619a8ce90181b074c5462231885)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Delivered entity.
- */
-class CRM_Mailing_Event_DAO_Delivered extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_delivered';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to EventQueue
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_queue_id;
-
-  /**
-   * When this delivery event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_delivered';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Mailing Delivery Events') : ts('Mailing Delivery Event');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Delivered ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_delivered.id',
-          'table_name' => 'civicrm_mailing_event_delivered',
-          'entity' => 'Delivered',
-          'bao' => 'CRM_Mailing_Event_BAO_Delivered',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_queue_id' => [
-          'name' => 'event_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Queue ID'),
-          'description' => ts('FK to EventQueue'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_delivered.event_queue_id',
-          'table_name' => 'civicrm_mailing_event_delivered',
-          'entity' => 'Delivered',
-          'bao' => 'CRM_Mailing_Event_BAO_Delivered',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Event Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Timestamp'),
-          'description' => ts('When this delivery event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_delivered.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_delivered',
-          'entity' => 'Delivered',
-          'bao' => 'CRM_Mailing_Event_BAO_Delivered',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_delivered', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_delivered', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventDelivered', 'CRM_Mailing_Event_DAO_Delivered');
index 5294c57af57c50bccdab005199b06b9a48afcc0e..2f5b1a2009f1919df39a6dce74d0480f9c728eb9 100644 (file)
@@ -1,246 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Forward.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:00dc8a162f5341080dbc2c5174c02d1e)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Forward entity.
- */
-class CRM_Mailing_Event_DAO_Forward extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_forward';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to EventQueue
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_queue_id;
-
-  /**
-   * FK to EventQueue for destination
-   *
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $dest_queue_id;
-
-  /**
-   * When this forward event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_forward';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Mailing Forwarded Events') : ts('Mailing Forwarded Event');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'dest_queue_id', 'civicrm_mailing_event_queue', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Forward ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_forward.id',
-          'table_name' => 'civicrm_mailing_event_forward',
-          'entity' => 'Forward',
-          'bao' => 'CRM_Mailing_Event_BAO_Forward',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_queue_id' => [
-          'name' => 'event_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Queue ID'),
-          'description' => ts('FK to EventQueue'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_forward.event_queue_id',
-          'table_name' => 'civicrm_mailing_event_forward',
-          'entity' => 'Forward',
-          'bao' => 'CRM_Mailing_Event_BAO_Forward',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Event Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'dest_queue_id' => [
-          'name' => 'dest_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Destination Queue ID'),
-          'description' => ts('FK to EventQueue for destination'),
-          'where' => 'civicrm_mailing_event_forward.dest_queue_id',
-          'table_name' => 'civicrm_mailing_event_forward',
-          'entity' => 'Forward',
-          'bao' => 'CRM_Mailing_Event_BAO_Forward',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Destination Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Timestamp'),
-          'description' => ts('When this forward event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_forward.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_forward',
-          'entity' => 'Forward',
-          'bao' => 'CRM_Mailing_Event_BAO_Forward',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_forward', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_forward', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventForward', 'CRM_Mailing_Event_DAO_Forward');
diff --git a/CRM/Mailing/Event/DAO/MailingEventBounce.php b/CRM/Mailing/Event/DAO/MailingEventBounce.php
new file mode 100644 (file)
index 0000000..91791bc
--- /dev/null
@@ -0,0 +1,272 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventBounce.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0751947895e7971b4b90c028f985d79e)
+ */
+
+/**
+ * Database access object for the MailingEventBounce entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventBounce extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_bounce';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to EventQueue
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_queue_id;
+
+  /**
+   * What type of bounce was it?
+   *
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $bounce_type_id;
+
+  /**
+   * The reason the email bounced.
+   *
+   * @var string|null
+   *   (SQL type: varchar(255))
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $bounce_reason;
+
+  /**
+   * When this bounce event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_bounce';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Bounce Events') : ts('Mailing Bounce Event');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Bounce ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_bounce.id',
+          'table_name' => 'civicrm_mailing_event_bounce',
+          'entity' => 'MailingEventBounce',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventBounce',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_queue_id' => [
+          'name' => 'event_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Event Queue ID'),
+          'description' => ts('FK to EventQueue'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_bounce.event_queue_id',
+          'table_name' => 'civicrm_mailing_event_bounce',
+          'entity' => 'MailingEventBounce',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventBounce',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Event Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'bounce_type_id' => [
+          'name' => 'bounce_type_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Bounce Type'),
+          'description' => ts('What type of bounce was it?'),
+          'where' => 'civicrm_mailing_event_bounce.bounce_type_id',
+          'table_name' => 'civicrm_mailing_event_bounce',
+          'entity' => 'MailingEventBounce',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventBounce',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Select',
+          ],
+          'pseudoconstant' => [
+            'table' => 'civicrm_mailing_bounce_type',
+            'keyColumn' => 'id',
+            'labelColumn' => 'name',
+          ],
+          'add' => NULL,
+        ],
+        'bounce_reason' => [
+          'name' => 'bounce_reason',
+          'type' => CRM_Utils_Type::T_STRING,
+          'title' => ts('Bounce Reason'),
+          'description' => ts('The reason the email bounced.'),
+          'maxlength' => 255,
+          'size' => CRM_Utils_Type::HUGE,
+          'where' => 'civicrm_mailing_event_bounce.bounce_reason',
+          'table_name' => 'civicrm_mailing_event_bounce',
+          'entity' => 'MailingEventBounce',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventBounce',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Timestamp'),
+          'description' => ts('When this bounce event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_bounce.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_bounce',
+          'entity' => 'MailingEventBounce',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventBounce',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_bounce', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_bounce', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventClickThrough.php b/CRM/Mailing/Event/DAO/MailingEventClickThrough.php
new file mode 100644 (file)
index 0000000..470d08b
--- /dev/null
@@ -0,0 +1,247 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventClickThrough.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0d946595f8d079473a48f68d6f3d6aff)
+ */
+
+/**
+ * Database access object for the MailingEventClickThrough entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventClickThrough extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_trackable_url_open';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to EventQueue
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_queue_id;
+
+  /**
+   * FK to TrackableURL
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $trackable_url_id;
+
+  /**
+   * When this trackable URL open occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_trackable_url_open';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Event Click Throughs') : ts('Mailing Event Click Through');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'trackable_url_id', 'civicrm_mailing_trackable_url', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Trackable URL Open ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_trackable_url_open.id',
+          'table_name' => 'civicrm_mailing_event_trackable_url_open',
+          'entity' => 'MailingEventClickThrough',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventClickThrough',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_queue_id' => [
+          'name' => 'event_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Event Queue ID'),
+          'description' => ts('FK to EventQueue'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_trackable_url_open.event_queue_id',
+          'table_name' => 'civicrm_mailing_event_trackable_url_open',
+          'entity' => 'MailingEventClickThrough',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventClickThrough',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Event Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'trackable_url_id' => [
+          'name' => 'trackable_url_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Trackable Url ID'),
+          'description' => ts('FK to TrackableURL'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_trackable_url_open.trackable_url_id',
+          'table_name' => 'civicrm_mailing_event_trackable_url_open',
+          'entity' => 'MailingEventClickThrough',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventClickThrough',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_DAO_TrackableURL',
+          'html' => [
+            'label' => ts("Trackable Url"),
+          ],
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Timestamp'),
+          'description' => ts('When this trackable URL open occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_trackable_url_open.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_trackable_url_open',
+          'entity' => 'MailingEventClickThrough',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventClickThrough',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_trackable_url_open', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_trackable_url_open', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventConfirm.php b/CRM/Mailing/Event/DAO/MailingEventConfirm.php
new file mode 100644 (file)
index 0000000..005f66a
--- /dev/null
@@ -0,0 +1,220 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventConfirm.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:86369b15229be197c34d66cef7afafd2)
+ */
+
+/**
+ * Database access object for the MailingEventConfirm entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventConfirm extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_confirm';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to civicrm_mailing_event_subscribe
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_subscribe_id;
+
+  /**
+   * When this confirmation event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_confirm';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Contribution Events') : ts('Mailing Confirmation Event');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_subscribe_id', 'civicrm_mailing_event_subscribe', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Mailing Confirmation ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_confirm.id',
+          'table_name' => 'civicrm_mailing_event_confirm',
+          'entity' => 'MailingEventConfirm',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventConfirm',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_subscribe_id' => [
+          'name' => 'event_subscribe_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Mailing Subscribe ID'),
+          'description' => ts('FK to civicrm_mailing_event_subscribe'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_confirm.event_subscribe_id',
+          'table_name' => 'civicrm_mailing_event_confirm',
+          'entity' => 'MailingEventConfirm',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventConfirm',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventSubscribe',
+          'html' => [
+            'label' => ts("Mailing Subscribe"),
+          ],
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Confirm Timestamp'),
+          'description' => ts('When this confirmation event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_confirm.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_confirm',
+          'entity' => 'MailingEventConfirm',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventConfirm',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_confirm', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_confirm', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventDelivered.php b/CRM/Mailing/Event/DAO/MailingEventDelivered.php
new file mode 100644 (file)
index 0000000..287c88d
--- /dev/null
@@ -0,0 +1,220 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventDelivered.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:5e99cc32141dbf841310a43bd23d55b3)
+ */
+
+/**
+ * Database access object for the MailingEventDelivered entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventDelivered extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_delivered';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to EventQueue
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_queue_id;
+
+  /**
+   * When this delivery event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_delivered';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Delivery Events') : ts('Mailing Delivery Event');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Delivered ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_delivered.id',
+          'table_name' => 'civicrm_mailing_event_delivered',
+          'entity' => 'MailingEventDelivered',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventDelivered',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_queue_id' => [
+          'name' => 'event_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Event Queue ID'),
+          'description' => ts('FK to EventQueue'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_delivered.event_queue_id',
+          'table_name' => 'civicrm_mailing_event_delivered',
+          'entity' => 'MailingEventDelivered',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventDelivered',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Event Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Timestamp'),
+          'description' => ts('When this delivery event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_delivered.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_delivered',
+          'entity' => 'MailingEventDelivered',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventDelivered',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_delivered', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_delivered', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventForward.php b/CRM/Mailing/Event/DAO/MailingEventForward.php
new file mode 100644 (file)
index 0000000..36ff71c
--- /dev/null
@@ -0,0 +1,246 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventForward.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:43123fe2515560aaa17b8f06c3a5f415)
+ */
+
+/**
+ * Database access object for the MailingEventForward entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventForward extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_forward';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to EventQueue
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_queue_id;
+
+  /**
+   * FK to EventQueue for destination
+   *
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $dest_queue_id;
+
+  /**
+   * When this forward event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_forward';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Forwarded Events') : ts('Mailing Forwarded Event');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'dest_queue_id', 'civicrm_mailing_event_queue', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Forward ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_forward.id',
+          'table_name' => 'civicrm_mailing_event_forward',
+          'entity' => 'MailingEventForward',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventForward',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_queue_id' => [
+          'name' => 'event_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Event Queue ID'),
+          'description' => ts('FK to EventQueue'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_forward.event_queue_id',
+          'table_name' => 'civicrm_mailing_event_forward',
+          'entity' => 'MailingEventForward',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventForward',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Event Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'dest_queue_id' => [
+          'name' => 'dest_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Destination Queue ID'),
+          'description' => ts('FK to EventQueue for destination'),
+          'where' => 'civicrm_mailing_event_forward.dest_queue_id',
+          'table_name' => 'civicrm_mailing_event_forward',
+          'entity' => 'MailingEventForward',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventForward',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Destination Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Timestamp'),
+          'description' => ts('When this forward event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_forward.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_forward',
+          'entity' => 'MailingEventForward',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventForward',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_forward', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_forward', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventOpened.php b/CRM/Mailing/Event/DAO/MailingEventOpened.php
new file mode 100644 (file)
index 0000000..f083eb0
--- /dev/null
@@ -0,0 +1,220 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventOpened.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:91cd2200ef1590b118b238ca21f9db72)
+ */
+
+/**
+ * Database access object for the MailingEventOpened entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventOpened extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_opened';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to EventQueue
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_queue_id;
+
+  /**
+   * When this open event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_opened';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Opened Events') : ts('Mailing Opened Event');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Mailing Opened ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_opened.id',
+          'table_name' => 'civicrm_mailing_event_opened',
+          'entity' => 'MailingEventOpened',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventOpened',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_queue_id' => [
+          'name' => 'event_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Event Queue ID'),
+          'description' => ts('FK to EventQueue'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_opened.event_queue_id',
+          'table_name' => 'civicrm_mailing_event_opened',
+          'entity' => 'MailingEventOpened',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventOpened',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Event Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Timestamp'),
+          'description' => ts('When this open event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_opened.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_opened',
+          'entity' => 'MailingEventOpened',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventOpened',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_opened', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_opened', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventQueue.php b/CRM/Mailing/Event/DAO/MailingEventQueue.php
new file mode 100644 (file)
index 0000000..1b53a79
--- /dev/null
@@ -0,0 +1,311 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventQueue.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:7b50d98fc8e1e8ef2a3d2dccec973a9d)
+ */
+
+/**
+ * Database access object for the MailingEventQueue entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventQueue extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_queue';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to Job
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $job_id;
+
+  /**
+   * FK to Email
+   *
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $email_id;
+
+  /**
+   * FK to Contact
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $contact_id;
+
+  /**
+   * Security hash
+   *
+   * @var string
+   *   (SQL type: varchar(255))
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $hash;
+
+  /**
+   * FK to Phone
+   *
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $phone_id;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_queue';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Queue Events') : ts('Mailing Queue Event');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'job_id', 'civicrm_mailing_job', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'email_id', 'civicrm_email', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'phone_id', 'civicrm_phone', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Mailing Event Queue ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_queue.id',
+          'table_name' => 'civicrm_mailing_event_queue',
+          'entity' => 'MailingEventQueue',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'job_id' => [
+          'name' => 'job_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Job ID'),
+          'description' => ts('FK to Job'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_queue.job_id',
+          'table_name' => 'civicrm_mailing_event_queue',
+          'entity' => 'MailingEventQueue',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
+          'html' => [
+            'label' => ts("Job"),
+          ],
+          'add' => NULL,
+        ],
+        'email_id' => [
+          'name' => 'email_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Email ID'),
+          'description' => ts('FK to Email'),
+          'where' => 'civicrm_mailing_event_queue.email_id',
+          'default' => NULL,
+          'table_name' => 'civicrm_mailing_event_queue',
+          'entity' => 'MailingEventQueue',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Core_DAO_Email',
+          'html' => [
+            'label' => ts("Email"),
+          ],
+          'add' => NULL,
+        ],
+        'contact_id' => [
+          'name' => 'contact_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Contact ID'),
+          'description' => ts('FK to Contact'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_queue.contact_id',
+          'table_name' => 'civicrm_mailing_event_queue',
+          'entity' => 'MailingEventQueue',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Contact_DAO_Contact',
+          'html' => [
+            'label' => ts("Contact"),
+          ],
+          'add' => NULL,
+        ],
+        'hash' => [
+          'name' => 'hash',
+          'type' => CRM_Utils_Type::T_STRING,
+          'title' => ts('Security Hash'),
+          'description' => ts('Security hash'),
+          'required' => TRUE,
+          'maxlength' => 255,
+          'size' => CRM_Utils_Type::HUGE,
+          'where' => 'civicrm_mailing_event_queue.hash',
+          'table_name' => 'civicrm_mailing_event_queue',
+          'entity' => 'MailingEventQueue',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+        'phone_id' => [
+          'name' => 'phone_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Phone ID'),
+          'description' => ts('FK to Phone'),
+          'where' => 'civicrm_mailing_event_queue.phone_id',
+          'default' => NULL,
+          'table_name' => 'civicrm_mailing_event_queue',
+          'entity' => 'MailingEventQueue',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Core_DAO_Phone',
+          'html' => [
+            'label' => ts("Phone"),
+          ],
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_queue', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_queue', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [
+      'index_hash' => [
+        'name' => 'index_hash',
+        'field' => [
+          0 => 'hash',
+        ],
+        'localizable' => FALSE,
+        'sig' => 'civicrm_mailing_event_queue::0::hash',
+      ],
+    ];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventReply.php b/CRM/Mailing/Event/DAO/MailingEventReply.php
new file mode 100644 (file)
index 0000000..a5edae5
--- /dev/null
@@ -0,0 +1,220 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventReply.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:a1fc69f5675f963e325b2af4cdb49364)
+ */
+
+/**
+ * Database access object for the MailingEventReply entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventReply extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_reply';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to EventQueue
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_queue_id;
+
+  /**
+   * When this reply event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_reply';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Event Replies') : ts('Mailing Event Reply');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Reply ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_reply.id',
+          'table_name' => 'civicrm_mailing_event_reply',
+          'entity' => 'MailingEventReply',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventReply',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_queue_id' => [
+          'name' => 'event_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Event Queue ID'),
+          'description' => ts('FK to EventQueue'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_reply.event_queue_id',
+          'table_name' => 'civicrm_mailing_event_reply',
+          'entity' => 'MailingEventReply',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventReply',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Event Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Reply Timestamp'),
+          'description' => ts('When this reply event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_reply.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_reply',
+          'entity' => 'MailingEventReply',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventReply',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_reply', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_reply', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventSubscribe.php b/CRM/Mailing/Event/DAO/MailingEventSubscribe.php
new file mode 100644 (file)
index 0000000..8b56405
--- /dev/null
@@ -0,0 +1,277 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventSubscribe.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:84c11335b5a1b4d892be1d2785010156)
+ */
+
+/**
+ * Database access object for the MailingEventSubscribe entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventSubscribe extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_subscribe';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to Group
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $group_id;
+
+  /**
+   * FK to Contact
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $contact_id;
+
+  /**
+   * Security hash
+   *
+   * @var string
+   *   (SQL type: varchar(255))
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $hash;
+
+  /**
+   * When this subscription event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_subscribe';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Event Subscribes') : ts('Mailing Event Subscribe');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'group_id', 'civicrm_group', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Mailing Subscribe ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_subscribe.id',
+          'table_name' => 'civicrm_mailing_event_subscribe',
+          'entity' => 'MailingEventSubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventSubscribe',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'group_id' => [
+          'name' => 'group_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Group ID'),
+          'description' => ts('FK to Group'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_subscribe.group_id',
+          'table_name' => 'civicrm_mailing_event_subscribe',
+          'entity' => 'MailingEventSubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventSubscribe',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Contact_DAO_Group',
+          'html' => [
+            'type' => 'Select',
+            'label' => ts("Group"),
+          ],
+          'pseudoconstant' => [
+            'table' => 'civicrm_group',
+            'keyColumn' => 'id',
+            'labelColumn' => 'title',
+          ],
+          'add' => NULL,
+        ],
+        'contact_id' => [
+          'name' => 'contact_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Contact ID'),
+          'description' => ts('FK to Contact'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_subscribe.contact_id',
+          'table_name' => 'civicrm_mailing_event_subscribe',
+          'entity' => 'MailingEventSubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventSubscribe',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Contact_DAO_Contact',
+          'html' => [
+            'label' => ts("Contact"),
+          ],
+          'add' => NULL,
+        ],
+        'hash' => [
+          'name' => 'hash',
+          'type' => CRM_Utils_Type::T_STRING,
+          'title' => ts('Mailing Subscribe Hash'),
+          'description' => ts('Security hash'),
+          'required' => TRUE,
+          'maxlength' => 255,
+          'size' => CRM_Utils_Type::HUGE,
+          'where' => 'civicrm_mailing_event_subscribe.hash',
+          'table_name' => 'civicrm_mailing_event_subscribe',
+          'entity' => 'MailingEventSubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventSubscribe',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Mailing Subscribe Timestamp'),
+          'description' => ts('When this subscription event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_subscribe.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_subscribe',
+          'entity' => 'MailingEventSubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventSubscribe',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_subscribe', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_subscribe', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
diff --git a/CRM/Mailing/Event/DAO/MailingEventUnsubscribe.php b/CRM/Mailing/Event/DAO/MailingEventUnsubscribe.php
new file mode 100644 (file)
index 0000000..87453a4
--- /dev/null
@@ -0,0 +1,242 @@
+<?php
+
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/MailingEventUnsubscribe.xml
+ * DO NOT EDIT.  Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:87c74fd468764c3eb514a36a25458fbf)
+ */
+
+/**
+ * Database access object for the MailingEventUnsubscribe entity.
+ */
+class CRM_Mailing_Event_DAO_MailingEventUnsubscribe extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '';
+  const COMPONENT = 'CiviMail';
+
+  /**
+   * Static instance to hold the table name.
+   *
+   * @var string
+   */
+  public static $_tableName = 'civicrm_mailing_event_unsubscribe';
+
+  /**
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
+   *
+   * @var bool
+   */
+  public static $_log = FALSE;
+
+  /**
+   * @var int|string|null
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $id;
+
+  /**
+   * FK to EventQueue
+   *
+   * @var int|string
+   *   (SQL type: int unsigned)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $event_queue_id;
+
+  /**
+   * Unsubscribe at org- or group-level
+   *
+   * @var bool|string
+   *   (SQL type: tinyint)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $org_unsubscribe;
+
+  /**
+   * When this delivery event occurred.
+   *
+   * @var string
+   *   (SQL type: timestamp)
+   *   Note that values will be retrieved from the database as a string.
+   */
+  public $time_stamp;
+
+  /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->__table = 'civicrm_mailing_event_unsubscribe';
+    parent::__construct();
+  }
+
+  /**
+   * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
+   */
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Mailing Event Unsubscribes') : ts('Mailing Event Unsubscribe');
+  }
+
+  /**
+   * Returns foreign keys and entity references.
+   *
+   * @return array
+   *   [CRM_Core_Reference_Interface]
+   */
+  public static function getReferenceColumns() {
+    if (!isset(Civi::$statics[__CLASS__]['links'])) {
+      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
+    }
+    return Civi::$statics[__CLASS__]['links'];
+  }
+
+  /**
+   * Returns all the column names of this table
+   *
+   * @return array
+   */
+  public static function &fields() {
+    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
+      Civi::$statics[__CLASS__]['fields'] = [
+        'id' => [
+          'name' => 'id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Unsubscribe ID'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_unsubscribe.id',
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'MailingEventUnsubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventUnsubscribe',
+          'localizable' => 0,
+          'html' => [
+            'type' => 'Number',
+          ],
+          'readonly' => TRUE,
+          'add' => NULL,
+        ],
+        'event_queue_id' => [
+          'name' => 'event_queue_id',
+          'type' => CRM_Utils_Type::T_INT,
+          'title' => ts('Event Queue ID'),
+          'description' => ts('FK to EventQueue'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_unsubscribe.event_queue_id',
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'MailingEventUnsubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventUnsubscribe',
+          'localizable' => 0,
+          'FKClassName' => 'CRM_Mailing_Event_DAO_MailingEventQueue',
+          'html' => [
+            'label' => ts("Event Queue"),
+          ],
+          'add' => NULL,
+        ],
+        'org_unsubscribe' => [
+          'name' => 'org_unsubscribe',
+          'type' => CRM_Utils_Type::T_BOOLEAN,
+          'title' => ts('Unsubscribe is for Organization?'),
+          'description' => ts('Unsubscribe at org- or group-level'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_unsubscribe.org_unsubscribe',
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'MailingEventUnsubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventUnsubscribe',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+        'time_stamp' => [
+          'name' => 'time_stamp',
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'title' => ts('Unsubscribe Timestamp'),
+          'description' => ts('When this delivery event occurred.'),
+          'required' => TRUE,
+          'where' => 'civicrm_mailing_event_unsubscribe.time_stamp',
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'MailingEventUnsubscribe',
+          'bao' => 'CRM_Mailing_Event_DAO_MailingEventUnsubscribe',
+          'localizable' => 0,
+          'add' => NULL,
+        ],
+      ];
+      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
+    }
+    return Civi::$statics[__CLASS__]['fields'];
+  }
+
+  /**
+   * Return a mapping from field-name to the corresponding key (as used in fields()).
+   *
+   * @return array
+   *   Array(string $name => string $uniqueName).
+   */
+  public static function &fieldKeys() {
+    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
+      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
+    }
+    return Civi::$statics[__CLASS__]['fieldKeys'];
+  }
+
+  /**
+   * Returns the names of this table
+   *
+   * @return string
+   */
+  public static function getTableName() {
+    return self::$_tableName;
+  }
+
+  /**
+   * Returns if this table needs to be logged
+   *
+   * @return bool
+   */
+  public function getLog() {
+    return self::$_log;
+  }
+
+  /**
+   * Returns the list of fields that can be imported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &import($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_unsubscribe', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of fields that can be exported
+   *
+   * @param bool $prefix
+   *
+   * @return array
+   */
+  public static function &export($prefix = FALSE) {
+    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_unsubscribe', $prefix, []);
+    return $r;
+  }
+
+  /**
+   * Returns the list of indices
+   *
+   * @param bool $localize
+   *
+   * @return array
+   */
+  public static function indices($localize = TRUE) {
+    $indices = [];
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
+
+}
index 1b17409c3e8a98f1a4f536e86d6a931c720ff3ed..3dac0864f4af6c40075d40e9096d8b355251d457 100644 (file)
@@ -1,220 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Opened.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d4d67ce8cffda8d6a69393bb05c4de22)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Opened entity.
- */
-class CRM_Mailing_Event_DAO_Opened extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_opened';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to EventQueue
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_queue_id;
-
-  /**
-   * When this open event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_opened';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Mailing Opened Events') : ts('Mailing Opened Event');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Mailing Opened ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_opened.id',
-          'table_name' => 'civicrm_mailing_event_opened',
-          'entity' => 'Opened',
-          'bao' => 'CRM_Mailing_Event_BAO_Opened',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_queue_id' => [
-          'name' => 'event_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Queue ID'),
-          'description' => ts('FK to EventQueue'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_opened.event_queue_id',
-          'table_name' => 'civicrm_mailing_event_opened',
-          'entity' => 'Opened',
-          'bao' => 'CRM_Mailing_Event_BAO_Opened',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Event Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Timestamp'),
-          'description' => ts('When this open event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_opened.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_opened',
-          'entity' => 'Opened',
-          'bao' => 'CRM_Mailing_Event_BAO_Opened',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_opened', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_opened', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventOpened', 'CRM_Mailing_Event_DAO_Opened');
index e2c9316970f7541b6d619bb3a5eb508cd345a3dd..ad8f2bbc779a4c59fc4786c6b3af9ca37239e290 100644 (file)
@@ -1,311 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Queue.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:989398dbe144d82d1f6998d7ae3677f3)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the MailingEventQueue entity.
- */
-class CRM_Mailing_Event_DAO_Queue extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_queue';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to Job
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $job_id;
-
-  /**
-   * FK to Email
-   *
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $email_id;
-
-  /**
-   * FK to Contact
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $contact_id;
-
-  /**
-   * Security hash
-   *
-   * @var string
-   *   (SQL type: varchar(255))
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $hash;
-
-  /**
-   * FK to Phone
-   *
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $phone_id;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_queue';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Mailing Queue Events') : ts('Mailing Queue Event');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'job_id', 'civicrm_mailing_job', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'email_id', 'civicrm_email', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'phone_id', 'civicrm_phone', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Mailing Event Queue ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_queue.id',
-          'table_name' => 'civicrm_mailing_event_queue',
-          'entity' => 'MailingEventQueue',
-          'bao' => 'CRM_Mailing_Event_BAO_Queue',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'job_id' => [
-          'name' => 'job_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Job ID'),
-          'description' => ts('FK to Job'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_queue.job_id',
-          'table_name' => 'civicrm_mailing_event_queue',
-          'entity' => 'MailingEventQueue',
-          'bao' => 'CRM_Mailing_Event_BAO_Queue',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
-          'html' => [
-            'label' => ts("Job"),
-          ],
-          'add' => NULL,
-        ],
-        'email_id' => [
-          'name' => 'email_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Email ID'),
-          'description' => ts('FK to Email'),
-          'where' => 'civicrm_mailing_event_queue.email_id',
-          'default' => NULL,
-          'table_name' => 'civicrm_mailing_event_queue',
-          'entity' => 'MailingEventQueue',
-          'bao' => 'CRM_Mailing_Event_BAO_Queue',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Core_DAO_Email',
-          'html' => [
-            'label' => ts("Email"),
-          ],
-          'add' => NULL,
-        ],
-        'contact_id' => [
-          'name' => 'contact_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Contact ID'),
-          'description' => ts('FK to Contact'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_queue.contact_id',
-          'table_name' => 'civicrm_mailing_event_queue',
-          'entity' => 'MailingEventQueue',
-          'bao' => 'CRM_Mailing_Event_BAO_Queue',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Contact_DAO_Contact',
-          'html' => [
-            'label' => ts("Contact"),
-          ],
-          'add' => NULL,
-        ],
-        'hash' => [
-          'name' => 'hash',
-          'type' => CRM_Utils_Type::T_STRING,
-          'title' => ts('Security Hash'),
-          'description' => ts('Security hash'),
-          'required' => TRUE,
-          'maxlength' => 255,
-          'size' => CRM_Utils_Type::HUGE,
-          'where' => 'civicrm_mailing_event_queue.hash',
-          'table_name' => 'civicrm_mailing_event_queue',
-          'entity' => 'MailingEventQueue',
-          'bao' => 'CRM_Mailing_Event_BAO_Queue',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-        'phone_id' => [
-          'name' => 'phone_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Phone ID'),
-          'description' => ts('FK to Phone'),
-          'where' => 'civicrm_mailing_event_queue.phone_id',
-          'default' => NULL,
-          'table_name' => 'civicrm_mailing_event_queue',
-          'entity' => 'MailingEventQueue',
-          'bao' => 'CRM_Mailing_Event_BAO_Queue',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Core_DAO_Phone',
-          'html' => [
-            'label' => ts("Phone"),
-          ],
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_queue', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_queue', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [
-      'index_hash' => [
-        'name' => 'index_hash',
-        'field' => [
-          0 => 'hash',
-        ],
-        'localizable' => FALSE,
-        'sig' => 'civicrm_mailing_event_queue::0::hash',
-      ],
-    ];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventQueue', 'CRM_Mailing_Event_DAO_Queue');
index 5543eb73311b0859fb8f628ecf7da868599369a2..647090078ad0ceaab03dcfd384833d3e6ec7cc8d 100644 (file)
@@ -1,220 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Reply.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ae509f21899ac03e3da0c904bb43cffe)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Reply entity.
- */
-class CRM_Mailing_Event_DAO_Reply extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_reply';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to EventQueue
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_queue_id;
-
-  /**
-   * When this reply event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_reply';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Replies') : ts('Reply');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Reply ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_reply.id',
-          'table_name' => 'civicrm_mailing_event_reply',
-          'entity' => 'Reply',
-          'bao' => 'CRM_Mailing_Event_BAO_Reply',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_queue_id' => [
-          'name' => 'event_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Queue ID'),
-          'description' => ts('FK to EventQueue'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_reply.event_queue_id',
-          'table_name' => 'civicrm_mailing_event_reply',
-          'entity' => 'Reply',
-          'bao' => 'CRM_Mailing_Event_BAO_Reply',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Event Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Reply Timestamp'),
-          'description' => ts('When this reply event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_reply.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_reply',
-          'entity' => 'Reply',
-          'bao' => 'CRM_Mailing_Event_BAO_Reply',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_reply', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_reply', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventReply', 'CRM_Mailing_Event_DAO_Reply');
index d10e4ceaa4e7ea097833ccef5ae9c6be60b5424c..6e40d04182807de304390279ae84c715f7065ffa 100644 (file)
@@ -1,277 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Subscribe.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d0c2fb1cb607f3aff970628d70d2b356)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Subscribe entity.
- */
-class CRM_Mailing_Event_DAO_Subscribe extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_subscribe';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to Group
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $group_id;
-
-  /**
-   * FK to Contact
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $contact_id;
-
-  /**
-   * Security hash
-   *
-   * @var string
-   *   (SQL type: varchar(255))
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $hash;
-
-  /**
-   * When this subscription event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_subscribe';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Subscribes') : ts('Subscribe');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'group_id', 'civicrm_group', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contact_id', 'civicrm_contact', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Mailing Subscribe ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_subscribe.id',
-          'table_name' => 'civicrm_mailing_event_subscribe',
-          'entity' => 'Subscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Subscribe',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'group_id' => [
-          'name' => 'group_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Group ID'),
-          'description' => ts('FK to Group'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_subscribe.group_id',
-          'table_name' => 'civicrm_mailing_event_subscribe',
-          'entity' => 'Subscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Subscribe',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Contact_DAO_Group',
-          'html' => [
-            'type' => 'Select',
-            'label' => ts("Group"),
-          ],
-          'pseudoconstant' => [
-            'table' => 'civicrm_group',
-            'keyColumn' => 'id',
-            'labelColumn' => 'title',
-          ],
-          'add' => NULL,
-        ],
-        'contact_id' => [
-          'name' => 'contact_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Contact ID'),
-          'description' => ts('FK to Contact'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_subscribe.contact_id',
-          'table_name' => 'civicrm_mailing_event_subscribe',
-          'entity' => 'Subscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Subscribe',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Contact_DAO_Contact',
-          'html' => [
-            'label' => ts("Contact"),
-          ],
-          'add' => NULL,
-        ],
-        'hash' => [
-          'name' => 'hash',
-          'type' => CRM_Utils_Type::T_STRING,
-          'title' => ts('Mailing Subscribe Hash'),
-          'description' => ts('Security hash'),
-          'required' => TRUE,
-          'maxlength' => 255,
-          'size' => CRM_Utils_Type::HUGE,
-          'where' => 'civicrm_mailing_event_subscribe.hash',
-          'table_name' => 'civicrm_mailing_event_subscribe',
-          'entity' => 'Subscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Subscribe',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Mailing Subscribe Timestamp'),
-          'description' => ts('When this subscription event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_subscribe.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_subscribe',
-          'entity' => 'Subscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Subscribe',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_subscribe', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_subscribe', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventSubscribe', 'CRM_Mailing_Event_DAO_Subscribe');
index ec1c76091bbc20eb7d81f71e20e126ecbe593da9..b44524d9472dcd367bc2f2fa19dc25a848d68820 100644 (file)
@@ -1,247 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/TrackableURLOpen.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d8f4ab49b2b156e5a954579ebf038572)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the TrackableURLOpen entity.
- */
-class CRM_Mailing_Event_DAO_TrackableURLOpen extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_trackable_url_open';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to EventQueue
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_queue_id;
-
-  /**
-   * FK to TrackableURL
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $trackable_url_id;
-
-  /**
-   * When this trackable URL open occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_trackable_url_open';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Trackable URLOpens') : ts('Trackable URLOpen');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'trackable_url_id', 'civicrm_mailing_trackable_url', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Trackable URL Open ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_trackable_url_open.id',
-          'table_name' => 'civicrm_mailing_event_trackable_url_open',
-          'entity' => 'TrackableURLOpen',
-          'bao' => 'CRM_Mailing_Event_BAO_TrackableURLOpen',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_queue_id' => [
-          'name' => 'event_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Queue ID'),
-          'description' => ts('FK to EventQueue'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_trackable_url_open.event_queue_id',
-          'table_name' => 'civicrm_mailing_event_trackable_url_open',
-          'entity' => 'TrackableURLOpen',
-          'bao' => 'CRM_Mailing_Event_BAO_TrackableURLOpen',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Event Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'trackable_url_id' => [
-          'name' => 'trackable_url_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Trackable Url ID'),
-          'description' => ts('FK to TrackableURL'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_trackable_url_open.trackable_url_id',
-          'table_name' => 'civicrm_mailing_event_trackable_url_open',
-          'entity' => 'TrackableURLOpen',
-          'bao' => 'CRM_Mailing_Event_BAO_TrackableURLOpen',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_DAO_TrackableURL',
-          'html' => [
-            'label' => ts("Trackable Url"),
-          ],
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Timestamp'),
-          'description' => ts('When this trackable URL open occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_trackable_url_open.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_trackable_url_open',
-          'entity' => 'TrackableURLOpen',
-          'bao' => 'CRM_Mailing_Event_BAO_TrackableURLOpen',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_trackable_url_open', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_trackable_url_open', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventClickThrough', 'CRM_Mailing_Event_DAO_TrackableURLOpen');
index f557959418d802c3c65f5a69c760b37c7e2b102b..e5cd857a656899a6f60198858a100eea43d021f0 100644 (file)
@@ -1,242 +1,6 @@
 <?php
 
 /**
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
- * Generated from xml/schema/CRM/Mailing/Event/Unsubscribe.xml
- * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:50dc3eee57e51ea43d12ede76cb6d6c9)
+ * DAO class was renamed in 5.57
  */
-
-/**
- * Database access object for the Unsubscribe entity.
- */
-class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
-  const EXT = 'civicrm';
-  const TABLE_ADDED = '';
-  const COMPONENT = 'CiviMail';
-
-  /**
-   * Static instance to hold the table name.
-   *
-   * @var string
-   */
-  public static $_tableName = 'civicrm_mailing_event_unsubscribe';
-
-  /**
-   * Should CiviCRM log any modifications to this table in the civicrm_log table.
-   *
-   * @var bool
-   */
-  public static $_log = FALSE;
-
-  /**
-   * @var int|string|null
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $id;
-
-  /**
-   * FK to EventQueue
-   *
-   * @var int|string
-   *   (SQL type: int unsigned)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_queue_id;
-
-  /**
-   * Unsubscribe at org- or group-level
-   *
-   * @var bool|string
-   *   (SQL type: tinyint)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $org_unsubscribe;
-
-  /**
-   * When this delivery event occurred.
-   *
-   * @var string
-   *   (SQL type: timestamp)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $time_stamp;
-
-  /**
-   * Class constructor.
-   */
-  public function __construct() {
-    $this->__table = 'civicrm_mailing_event_unsubscribe';
-    parent::__construct();
-  }
-
-  /**
-   * Returns localized title of this entity.
-   *
-   * @param bool $plural
-   *   Whether to return the plural version of the title.
-   */
-  public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('Unsubscribes') : ts('Unsubscribe');
-  }
-
-  /**
-   * Returns foreign keys and entity references.
-   *
-   * @return array
-   *   [CRM_Core_Reference_Interface]
-   */
-  public static function getReferenceColumns() {
-    if (!isset(Civi::$statics[__CLASS__]['links'])) {
-      Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__);
-      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
-    }
-    return Civi::$statics[__CLASS__]['links'];
-  }
-
-  /**
-   * Returns all the column names of this table
-   *
-   * @return array
-   */
-  public static function &fields() {
-    if (!isset(Civi::$statics[__CLASS__]['fields'])) {
-      Civi::$statics[__CLASS__]['fields'] = [
-        'id' => [
-          'name' => 'id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Unsubscribe ID'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_unsubscribe.id',
-          'table_name' => 'civicrm_mailing_event_unsubscribe',
-          'entity' => 'Unsubscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Number',
-          ],
-          'readonly' => TRUE,
-          'add' => NULL,
-        ],
-        'event_queue_id' => [
-          'name' => 'event_queue_id',
-          'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Event Queue ID'),
-          'description' => ts('FK to EventQueue'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_unsubscribe.event_queue_id',
-          'table_name' => 'civicrm_mailing_event_unsubscribe',
-          'entity' => 'Unsubscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
-          'localizable' => 0,
-          'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
-          'html' => [
-            'label' => ts("Event Queue"),
-          ],
-          'add' => NULL,
-        ],
-        'org_unsubscribe' => [
-          'name' => 'org_unsubscribe',
-          'type' => CRM_Utils_Type::T_BOOLEAN,
-          'title' => ts('Unsubscribe is for Organization?'),
-          'description' => ts('Unsubscribe at org- or group-level'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_unsubscribe.org_unsubscribe',
-          'table_name' => 'civicrm_mailing_event_unsubscribe',
-          'entity' => 'Unsubscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-        'time_stamp' => [
-          'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
-          'title' => ts('Unsubscribe Timestamp'),
-          'description' => ts('When this delivery event occurred.'),
-          'required' => TRUE,
-          'where' => 'civicrm_mailing_event_unsubscribe.time_stamp',
-          'default' => 'CURRENT_TIMESTAMP',
-          'table_name' => 'civicrm_mailing_event_unsubscribe',
-          'entity' => 'Unsubscribe',
-          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
-          'localizable' => 0,
-          'add' => NULL,
-        ],
-      ];
-      CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
-    }
-    return Civi::$statics[__CLASS__]['fields'];
-  }
-
-  /**
-   * Return a mapping from field-name to the corresponding key (as used in fields()).
-   *
-   * @return array
-   *   Array(string $name => string $uniqueName).
-   */
-  public static function &fieldKeys() {
-    if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
-      Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
-    }
-    return Civi::$statics[__CLASS__]['fieldKeys'];
-  }
-
-  /**
-   * Returns the names of this table
-   *
-   * @return string
-   */
-  public static function getTableName() {
-    return self::$_tableName;
-  }
-
-  /**
-   * Returns if this table needs to be logged
-   *
-   * @return bool
-   */
-  public function getLog() {
-    return self::$_log;
-  }
-
-  /**
-   * Returns the list of fields that can be imported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &import($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'mailing_event_unsubscribe', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of fields that can be exported
-   *
-   * @param bool $prefix
-   *
-   * @return array
-   */
-  public static function &export($prefix = FALSE) {
-    $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_unsubscribe', $prefix, []);
-    return $r;
-  }
-
-  /**
-   * Returns the list of indices
-   *
-   * @param bool $localize
-   *
-   * @return array
-   */
-  public static function indices($localize = TRUE) {
-    $indices = [];
-    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
-  }
-
-}
+class_alias('CRM_Mailing_Event_DAO_MailingEventUnsubscribe', 'CRM_Mailing_Event_DAO_Unsubscribe');
index 416ecaf44db109e0f1ec962d06780c11cf9bddc6..b7b676487d323effd0030b6be143f62b86f0a773 100644 (file)
@@ -38,7 +38,7 @@ class CRM_Mailing_Form_ForwardMailing extends CRM_Core_Form {
     $mailing = &$q->getMailing();
 
     if ($hash) {
-      $emailId = CRM_Core_DAO::getfieldValue('CRM_Mailing_Event_DAO_Queue', $hash, 'email_id', 'hash');
+      $emailId = CRM_Core_DAO::getfieldValue('CRM_Mailing_Event_DAO_MailingEventQueue', $hash, 'email_id', 'hash');
       $this->_fromEmail = $fromEmail = CRM_Core_DAO::getfieldValue('CRM_Core_DAO_Email', $emailId, 'email');
       $this->assign('fromEmail', $fromEmail);
     }
index d4cd2cec113168bbbac45ea60c1da8e296bd68aa..c7aebb173f282b24333e0c258b21c7726e26e8d0 100644 (file)
@@ -171,7 +171,7 @@ class CRM_Report_Form_Mailing_Clicks extends CRM_Report_Form {
     ];
 
     $this->_columns['civicrm_mailing_event_trackable_url_open'] = [
-      'dao' => 'CRM_Mailing_Event_DAO_TrackableURLOpen',
+      'dao' => 'CRM_Mailing_Event_DAO_MailingEventClickThrough',
       'fields' => [
         'time_stamp' => [
           'title' => ts('Click Date'),
index f6902c03b76b20c35f978840f5272c6fd49e23d5..9afed0ae97b4f4f4fe2c3a02c6084a88e4a26115 100644 (file)
@@ -120,11 +120,11 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
 
     // adding dao just to have alias
     $this->_columns['civicrm_mailing_event_bounce'] = [
-      'dao' => 'CRM_Mailing_Event_DAO_Bounce',
+      'dao' => 'CRM_Mailing_Event_DAO_MailingEventBounce',
     ];
 
     $this->_columns['civicrm_mailing_event_delivered'] = [
-      'dao' => 'CRM_Mailing_Event_DAO_Delivered',
+      'dao' => 'CRM_Mailing_Event_DAO_MailingEventDelivered',
       'fields' => [
         'delivery_id' => [
           'name' => 'id',
@@ -149,7 +149,7 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
     ];
 
     $this->_columns['civicrm_mailing_event_unsubscribe'] = [
-      'dao' => 'CRM_Mailing_Event_DAO_Unsubscribe',
+      'dao' => 'CRM_Mailing_Event_DAO_MailingEventUnsubscribe',
       'fields' => [
         'unsubscribe_id' => [
           'name' => 'id',
@@ -192,7 +192,7 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
     ];
 
     $this->_columns['civicrm_mailing_event_reply'] = [
-      'dao' => 'CRM_Mailing_Event_DAO_Reply',
+      'dao' => 'CRM_Mailing_Event_DAO_MailingEventReply',
       'fields' => [
         'reply_id' => [
           'name' => 'id',
@@ -217,7 +217,7 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form {
     ];
 
     $this->_columns['civicrm_mailing_event_forward'] = [
-      'dao' => 'CRM_Mailing_Event_DAO_Forward',
+      'dao' => 'CRM_Mailing_Event_DAO_MailingEventForward',
       'fields' => [
         'forward_id' => [
           'name' => 'id',
index 4f5b76d6557d431e637db88ef892e8134b377da3..5d6c5151f76c785985f688e0c6dd725ffb0b2475 100644 (file)
@@ -152,7 +152,7 @@ class CRM_Report_Form_Mailing_Opened extends CRM_Report_Form {
     ];
 
     $this->_columns['civicrm_mailing_event_opened'] = [
-      'dao' => 'CRM_Mailing_Event_DAO_Opened',
+      'dao' => 'CRM_Mailing_Event_DAO_MailingEventOpened',
       'fields' => [
         'id' => [
           'required' => TRUE,
index 603fa3adfc0ae068c6edeea5244c666e99ad8160..6b0376cf711277ed9dc51e8dad22c6d2d311b23d 100644 (file)
@@ -201,7 +201,7 @@ class CRM_Utils_VersionCheck {
       'CRM_Member_DAO_MembershipBlock' => 'is_active = 1',
       'CRM_Pledge_DAO_Pledge' => 'is_test = 0',
       'CRM_Pledge_DAO_PledgeBlock' => NULL,
-      'CRM_Mailing_Event_DAO_Delivered' => NULL,
+      'CRM_Mailing_Event_DAO_MailingEventDelivered' => NULL,
     ];
     foreach ($tables as $daoName => $where) {
       if (class_exists($daoName)) {
index 90f23c928f8bf706a0ea0bbe06621359161ecc99..8b5d6eb67f121494fc556b5b0cf29a627c233721 100644 (file)
@@ -471,7 +471,7 @@ function _civicrm_api3_mailing_event_forward_spec(&$params) {
  */
 function civicrm_api3_mailing_event_click($params) {
   civicrm_api3_verify_mandatory($params,
-    'CRM_Mailing_Event_DAO_TrackableURLOpen',
+    'CRM_Mailing_Event_DAO_MailingEventClickThrough',
     ['event_queue_id', 'url_id'],
     FALSE
   );
@@ -498,7 +498,7 @@ function civicrm_api3_mailing_event_click($params) {
 function civicrm_api3_mailing_event_open($params) {
 
   civicrm_api3_verify_mandatory($params,
-    'CRM_Mailing_Event_DAO_Opened',
+    'CRM_Mailing_Event_DAO_MailingEventOpened',
     ['event_queue_id'],
     FALSE
   );
index 648defa7e1f25de4e0b8fd0b83df084efca47e9f..5b6688d3f8661f77ea8ed9fe51ce629c65e4d9d9 100644 (file)
@@ -311,15 +311,6 @@ function _civicrm_api3_get_DAO($name) {
 
   // hack to deal with incorrectly named BAO/DAO - see CRM-10859
 
-  // FIXME: DAO should be renamed CRM_Mailing_DAO_MailingEventQueue
-  if ($name === 'MailingEventQueue') {
-    return 'CRM_Mailing_Event_DAO_Queue';
-  }
-  // FIXME: DAO should be renamed CRM_Mailing_DAO_MailingRecipients
-  // but am not confident mailing_recipients is tested so have not tackled.
-  if ($name === 'MailingRecipients') {
-    return 'CRM_Mailing_DAO_Recipients';
-  }
   if ($name === 'AclRole' || $name === 'ACLRole') {
     return 'CRM_ACL_DAO_ACLEntityRole';
   }
index 92f9a01a3213661a0dbab3c278c10c968ccd3466..5b17485784774fbc061ce36799d1f2a8fad25cdd 100644 (file)
@@ -28,7 +28,7 @@ class FlexMailerTask {
   /**
    * @var int
    *   A persistent record for this email delivery.
-   * @see \CRM_Mailing_Event_DAO_Queue
+   * @see \CRM_Mailing_Event_DAO_MailingEventQueue
    */
   private $eventQueueId;
 
@@ -87,7 +87,7 @@ class FlexMailerTask {
 
   /**
    * @return int
-   * @see \CRM_Mailing_Event_DAO_Queue
+   * @see \CRM_Mailing_Event_DAO_MailingEventQueue
    */
   public function getEventQueueId() {
     return $this->eventQueueId;
index 29f75600b1c30b784a6a6e3c71ea5a7e1799db53..357ce2f2e19436b0c54d668fc335eda902da3d30 100644 (file)
@@ -869,13 +869,13 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'sample' => 'Scheduled',
         ],
       ],
-      'CRM_Mailing_Event_DAO_Bounce' => [
+      'CRM_Mailing_Event_DAO_MailingEventBounce' => [
         [
           'fieldName' => 'bounce_type_id',
           'sample' => 'Invalid',
         ],
       ],
-      'CRM_Mailing_Event_DAO_Subscribe' => [
+      'CRM_Mailing_Event_DAO_MailingEventSubscribe' => [
         [
           'fieldName' => 'group_id',
           'sample' => $group_name,
index e0c6f33d8f8d485682f71b21b11850949264904c..bac803fc07add3c9e4dd5f1d1115560df680c5ed 100644 (file)
@@ -749,8 +749,8 @@ class api_v3_MailingTest extends CiviUnitTestCase {
     //CRM-20431 - Delete group id that matches first mailing id.
     $this->callAPISuccess('Group', 'delete', ['id' => $this->_groupID]);
     $jobId = CRM_Core_DAO::getFieldValue('CRM_Mailing_DAO_MailingJob', $mail2['id'], 'id', 'mailing_id');
-    $hash = CRM_Core_DAO::getFieldValue('CRM_Mailing_Event_DAO_Queue', $jobId, 'hash', 'job_id');
-    $queueId = CRM_Core_DAO::getFieldValue('CRM_Mailing_Event_DAO_Queue', $jobId, 'id', 'job_id');
+    $hash = CRM_Core_DAO::getFieldValue('CRM_Mailing_Event_DAO_MailingEventQueue', $jobId, 'hash', 'job_id');
+    $queueId = CRM_Core_DAO::getFieldValue('CRM_Mailing_Event_DAO_MailingEventQueue', $jobId, 'id', 'job_id');
     // This gets the list of groups to unsubscribe but does NOT actually unsubcribe from groups (because return=TRUE)
     $beforeUnsubscribeGroups = CRM_Mailing_Event_BAO_Unsubscribe::unsub_from_mailing($jobId, $queueId, $hash, TRUE);
     // Assert that there are two groups in the unsubscribe list.
similarity index 98%
rename from xml/schema/Mailing/Event/Bounce.xml
rename to xml/schema/Mailing/Event/MailingEventBounce.xml
index 667722239159e27ae64d3f52a25dd430ee826baa..f71cd47953f26c628833bd70e42a7265e38724b2 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Bounce</class>
+  <class>MailingEventBounce</class>
   <name>civicrm_mailing_event_bounce</name>
   <comment>Tracks when and why an email bounced.</comment>
   <archive>true</archive>
similarity index 97%
rename from xml/schema/Mailing/Event/TrackableURLOpen.xml
rename to xml/schema/Mailing/Event/MailingEventClickThrough.xml
index 3fef9d75e9cc32aa36fa4a8e517646e3f9e06906..54721f4f96049e0ef05fe95acf9790402201fd67 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>TrackableURLOpen</class>
+  <class>MailingEventClickThrough</class>
   <name>civicrm_mailing_event_trackable_url_open</name>
   <comment>Tracks when a TrackableURL is clicked by a recipient.</comment>
   <archive>true</archive>
similarity index 97%
rename from xml/schema/Mailing/Event/Confirm.xml
rename to xml/schema/Mailing/Event/MailingEventConfirm.xml
index 51c5b37b9231202da435949968c4c679fa267a36..7e12d7eee398a03accf597fa87313ede900bb043 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Confirm</class>
+  <class>MailingEventConfirm</class>
   <name>civicrm_mailing_event_confirm</name>
   <comment>Tracks when a subscription event is confirmed by email</comment>
   <archive>true</archive>
similarity index 97%
rename from xml/schema/Mailing/Event/Delivered.xml
rename to xml/schema/Mailing/Event/MailingEventDelivered.xml
index 17d676dfaa8e10c4481859911bfed8af1a19f333..9993110d8dcd033144b7da5b66def76b0b938dc3 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Delivered</class>
+  <class>MailingEventDelivered</class>
   <name>civicrm_mailing_event_delivered</name>
   <comment>Tracks when a queued email is actually delivered to the MTA</comment>
   <archive>true</archive>
similarity index 97%
rename from xml/schema/Mailing/Event/Forward.xml
rename to xml/schema/Mailing/Event/MailingEventForward.xml
index 7198f96ddfa4223b98e26ccf64683d458970c990..6afbd4b956a1b76373cd59692fc9e2e81155e4ba 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Forward</class>
+  <class>MailingEventForward</class>
   <name>civicrm_mailing_event_forward</name>
   <comment>Tracks when a contact forwards a mailing to a (new) contact</comment>
   <archive>true</archive>
similarity index 97%
rename from xml/schema/Mailing/Event/Opened.xml
rename to xml/schema/Mailing/Event/MailingEventOpened.xml
index 6b71ab226b71c96478b6003b70f774d34fdb0cf8..96b722c84b5656e4de52fcdc1847b3963231d99e 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Opened</class>
+  <class>MailingEventOpened</class>
   <name>civicrm_mailing_event_opened</name>
   <comment>Tracks when a delivered email is opened by the recipient</comment>
   <archive>true</archive>
similarity index 98%
rename from xml/schema/Mailing/Event/Queue.xml
rename to xml/schema/Mailing/Event/MailingEventQueue.xml
index 491eddaa75eaa66dc72d2ee84bb2143f1575e0d5..762cca8ccad9b536be0c47495fb7707970efaf2d 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Queue</class>
+  <class>MailingEventQueue</class>
   <entity>MailingEventQueue</entity>
   <name>civicrm_mailing_event_queue</name>
   <comment>A collection of all intended recipients of a job</comment>
similarity index 97%
rename from xml/schema/Mailing/Event/Reply.xml
rename to xml/schema/Mailing/Event/MailingEventReply.xml
index 4f5d80199944a621e711b13cda54573eb542f8aa..fac5cce5c435d0de7ed9354aa4040e7885b7930e 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Reply</class>
+  <class>MailingEventReply</class>
   <name>civicrm_mailing_event_reply</name>
   <comment>Tracks when a contact replies to a mailing</comment>
   <archive>true</archive>
similarity index 98%
rename from xml/schema/Mailing/Event/Subscribe.xml
rename to xml/schema/Mailing/Event/MailingEventSubscribe.xml
index 52f17b30afe89fb2678f01ab325846c1b442c6f9..80422205be3bc5c52d5253cc59aaa2a1e586da25 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Subscribe</class>
+  <class>MailingEventSubscribe</class>
   <name>civicrm_mailing_event_subscribe</name>
   <comment>Tracks when a (new) contact subscribes to a group by email</comment>
   <archive>true</archive>
similarity index 97%
rename from xml/schema/Mailing/Event/Unsubscribe.xml
rename to xml/schema/Mailing/Event/MailingEventUnsubscribe.xml
index a4f10f01055e0938326e992f6a84b2fc518fd95c..3b0d3215afffecbffcbde08d103e46dfda5b1cbe 100644 (file)
@@ -2,7 +2,7 @@
 
 <table>
   <base>CRM/Mailing/Event</base>
-  <class>Unsubscribe</class>
+  <class>MailingEventUnsubscribe</class>
   <name>civicrm_mailing_event_unsubscribe</name>
   <comment>Tracks when a recipient unsubscribes from a group/domain</comment>
   <archive>true</archive>
index 6d82160452c37ef59aea46b2b8f28fba42079676..eac25940e03cb59cd486b4cf0fa9d3fe465c3ce3 100644 (file)
@@ -2,15 +2,15 @@
 
 <tables xmlns:xi="http://www.w3.org/2001/XInclude">
 
-<xi:include href="Queue.xml"            parse="xml" />
-<xi:include href="Bounce.xml"           parse="xml" />
-<xi:include href="Delivered.xml"        parse="xml" />
-<xi:include href="Forward.xml"          parse="xml" />
-<xi:include href="Opened.xml"           parse="xml" />
-<xi:include href="Reply.xml"            parse="xml" />
-<xi:include href="Subscribe.xml"        parse="xml" />
-<xi:include href="Confirm.xml"          parse="xml" />
-<xi:include href="TrackableURLOpen.xml" parse="xml" />
-<xi:include href="Unsubscribe.xml"      parse="xml" />
+<xi:include href="MailingEventQueue.xml"            parse="xml" />
+<xi:include href="MailingEventBounce.xml"           parse="xml" />
+<xi:include href="MailingEventDelivered.xml"        parse="xml" />
+<xi:include href="MailingEventForward.xml"          parse="xml" />
+<xi:include href="MailingEventOpened.xml"           parse="xml" />
+<xi:include href="MailingEventReply.xml"            parse="xml" />
+<xi:include href="MailingEventSubscribe.xml"        parse="xml" />
+<xi:include href="MailingEventConfirm.xml"          parse="xml" />
+<xi:include href="MailingEventClickThrough.xml" parse="xml" />
+<xi:include href="MailingEventUnsubscribe.xml"      parse="xml" />
 
 </tables>
similarity index 94%
rename from xml/schema/Mailing/Recipients.xml
rename to xml/schema/Mailing/MailingRecipients.xml
index 4585b6652486d7bae7d380cd60c4ace4e344ef77..12bb2e988a925afb8bee2d9ab71209b8b3c0b92d 100644 (file)
@@ -2,13 +2,13 @@
 
 <table>
   <base>CRM/Mailing</base>
-  <class>Recipients</class>
+  <class>MailingRecipients</class>
   <name>civicrm_mailing_recipients</name>
   <comment>Stores information about the recipients of a mailing.</comment>
   <archive>true</archive>
   <component>CiviMail</component>
-  <title>Recipient</title>
-  <titlePlural>Recipients</titlePlural>
+  <title>Mailing Recipient</title>
+  <titlePlural>Mailing Recipients</titlePlural>
   <field>
     <name>id</name>
     <title>Mailing Recipients ID</title>
index 22a924c9baea4d2fd3fd2ae818b18231a3b02a95..00c885a810626ecc0036e07f7f7e1d9174f756d3 100644 (file)
@@ -2,13 +2,13 @@
 
 <tables xmlns:xi="http://www.w3.org/2001/XInclude">
 
-<xi:include href="Component.xml"     parse="xml" />
+<xi:include href="MailingComponent.xml"     parse="xml" />
 <xi:include href="Mailing.xml"       parse="xml" />
 <xi:include href="MailingAB.xml"     parse="xml" />
 <xi:include href="MailingGroup.xml"  parse="xml" />
 <xi:include href="TrackableURL.xml"  parse="xml" />
 <xi:include href="MailingJob.xml"    parse="xml" />
-<xi:include href="Recipients.xml"    parse="xml" />
+<xi:include href="MailingRecipients.xml"    parse="xml" />
 <xi:include href="BounceType.xml"    parse="xml" />
 <xi:include href="BouncePattern.xml" parse="xml" />
 <xi:include href="Spool.xml"         parse="xml" />