Merge pull request #10217 from fuzionnz/CRM-20466-php7.1_only_vars_by_ref
[civicrm-core.git] / CRM / Mailing / Event / DAO / Unsubscribe.php
index 585ff44b4518b77439fd8000ca9bcf642f69c790..d18f977fab8018ce8d8ec961003748110a01f42b 100644 (file)
  *
  * Generated from xml/schema/CRM/Mailing/Event/Unsubscribe.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6494a1c74d3259aaec6b09e69b4c42ae)
+ * (GenCodeChecksum:a44ecc4ce8b1a8ecdca57fff8d053392)
  */
 require_once 'CRM/Core/DAO.php';
 require_once 'CRM/Utils/Type.php';
+/**
+ * CRM_Mailing_Event_DAO_Unsubscribe constructor.
+ */
 class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
   /**
-   * static instance to hold the table name
+   * Static instance to hold the table name.
    *
    * @var string
    */
   static $_tableName = 'civicrm_mailing_event_unsubscribe';
   /**
-   * static value to see if we should log any modifications to
-   * this table in the civicrm_log table
+   * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
    * @var boolean
    */
@@ -68,20 +70,18 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
   /**
    * When this delivery event occurred.
    *
-   * @var datetime
+   * @var timestamp
    */
   public $time_stamp;
   /**
-   * class constructor
-   *
-   * @return civicrm_mailing_event_unsubscribe
+   * Class constructor.
    */
   function __construct() {
     $this->__table = 'civicrm_mailing_event_unsubscribe';
     parent::__construct();
   }
   /**
-   * Returns foreign keys and entity references
+   * Returns foreign keys and entity references.
    *
    * @return array
    *   [CRM_Core_Reference_Interface]
@@ -107,6 +107,10 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Unsubscribe ID') ,
           'required' => true,
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'Unsubscribe',
+          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
+          'localizable' => 0,
         ) ,
         'event_queue_id' => array(
           'name' => 'event_queue_id',
@@ -114,6 +118,10 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
           'title' => ts('Mailing Event Queue') ,
           'description' => 'FK to EventQueue',
           'required' => true,
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'Unsubscribe',
+          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
+          'localizable' => 0,
           'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
         ) ,
         'org_unsubscribe' => array(
@@ -122,13 +130,22 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
           'title' => ts('Unsubscribe is for Organization?') ,
           'description' => 'Unsubscribe at org- or group-level',
           'required' => true,
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'Unsubscribe',
+          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
+          'localizable' => 0,
         ) ,
         'time_stamp' => array(
           'name' => 'time_stamp',
-          'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
           'title' => ts('Unsubscribe Timestamp') ,
           'description' => 'When this delivery event occurred.',
           'required' => true,
+          'default' => 'CURRENT_TIMESTAMP',
+          'table_name' => 'civicrm_mailing_event_unsubscribe',
+          'entity' => 'Unsubscribe',
+          'bao' => 'CRM_Mailing_Event_BAO_Unsubscribe',
+          'localizable' => 0,
         ) ,
       );
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
@@ -185,4 +202,11 @@ class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
     $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'mailing_event_unsubscribe', $prefix, array());
     return $r;
   }
+  /**
+   * Returns the list of indices
+   */
+  public static function indices($localize = TRUE) {
+    $indices = array();
+    return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+  }
 }