Merge pull request #23575 from civicrm/5.50
[civicrm-core.git] / CRM / Event / DAO / Event.php
index afc84033dca870b478324366064eeadb6082240c..b949ec5b81d26f80569c7fb81f613588f41b3eb3 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Event/Event.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d9ea1f641de04dabb54616ef4edfe88c)
+ * (GenCodeChecksum:ddad900cfc0f303d651fa7b935157992)
  */
 
 /**
@@ -112,7 +112,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -121,8 +121,8 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Date and time that event starts.
    *
-   * @var string
-   *   (SQL type: timestamp)
+   * @var string|null
+   *   (SQL type: datetime)
    *   Note that values will be retrieved from the database as a string.
    */
   public $start_date;
@@ -130,8 +130,8 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Date and time that event ends. May be NULL if no defined end date/time
    *
-   * @var string
-   *   (SQL type: timestamp)
+   * @var string|null
+   *   (SQL type: datetime)
    *   Note that values will be retrieved from the database as a string.
    */
   public $end_date;
@@ -139,7 +139,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * If true, include registration link on Event Info page.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -157,8 +157,8 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Date and time that online registration starts.
    *
-   * @var string
-   *   (SQL type: timestamp)
+   * @var string|null
+   *   (SQL type: datetime)
    *   Note that values will be retrieved from the database as a string.
    */
   public $registration_start_date;
@@ -166,8 +166,8 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Date and time that online registration ends.
    *
-   * @var string
-   *   (SQL type: timestamp)
+   * @var string|null
+   *   (SQL type: datetime)
    *   Note that values will be retrieved from the database as a string.
    */
   public $registration_end_date;
@@ -193,7 +193,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -220,7 +220,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -229,7 +229,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Is this Event enabled or disabled/cancelled?
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -245,7 +245,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * If true, show event location.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -317,7 +317,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * If true, confirmation is automatically emailed to contact on successful registration.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -416,7 +416,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * if true - allows the user to send payment directly to the org later
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -443,7 +443,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * is partial payment enabled for this event
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -479,7 +479,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * if true - allows the user to register multiple participants for event
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -497,7 +497,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * if true - allows the user to register multiple registrations from same email address.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -506,7 +506,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Whether the event has waitlist support.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -515,7 +515,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Whether participants require approval before they can finish registering.
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -533,7 +533,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Allow self service cancellation or transfer for event?
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -623,7 +623,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * Can people share the event through social media?
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -632,7 +632,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * If false, the event booking confirmation screen gets skipped
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -668,21 +668,12 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
   /**
    * if true than billing block is required this event
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
   public $is_billing_required;
 
-  /**
-   * Event's native time zone
-   *
-   * @var string|null
-   *   (SQL type: text)
-   *   Note that values will be retrieved from the database as a string.
-   */
-  public $event_tz;
-
   /**
    * Class constructor.
    */
@@ -852,6 +843,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is Event Public'),
           'description' => ts('Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_public',
           'default' => '1',
           'table_name' => 'civicrm_event',
@@ -865,15 +857,13 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
         ],
         'event_start_date' => [
           'name' => 'start_date',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
           'title' => ts('Event Start Date'),
           'description' => ts('Date and time that event starts.'),
-          'required' => FALSE,
           'import' => TRUE,
           'where' => 'civicrm_event.start_date',
           'headerPattern' => '/^start|(s(tart\s)?date)$/i',
           'export' => TRUE,
-          'default' => NULL,
           'table_name' => 'civicrm_event',
           'entity' => 'Event',
           'bao' => 'CRM_Event_BAO_Event',
@@ -886,15 +876,13 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
         ],
         'event_end_date' => [
           'name' => 'end_date',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
           'title' => ts('Event End Date'),
           'description' => ts('Date and time that event ends. May be NULL if no defined end date/time'),
-          'required' => FALSE,
           'import' => TRUE,
           'where' => 'civicrm_event.end_date',
           'headerPattern' => '/^end|(e(nd\s)?date)$/i',
           'export' => TRUE,
-          'default' => NULL,
           'table_name' => 'civicrm_event',
           'entity' => 'Event',
           'bao' => 'CRM_Event_BAO_Event',
@@ -910,6 +898,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is Online Registration'),
           'description' => ts('If true, include registration link on Event Info page.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_online_registration',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -940,12 +929,10 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
         ],
         'registration_start_date' => [
           'name' => 'registration_start_date',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
           'title' => ts('Registration Start Date'),
           'description' => ts('Date and time that online registration starts.'),
-          'required' => FALSE,
           'where' => 'civicrm_event.registration_start_date',
-          'default' => NULL,
           'table_name' => 'civicrm_event',
           'entity' => 'Event',
           'bao' => 'CRM_Event_BAO_Event',
@@ -959,12 +946,10 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
         ],
         'registration_end_date' => [
           'name' => 'registration_end_date',
-          'type' => CRM_Utils_Type::T_TIMESTAMP,
+          'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
           'title' => ts('Registration End Date'),
           'description' => ts('Date and time that online registration ends.'),
-          'required' => FALSE,
           'where' => 'civicrm_event.registration_end_date',
-          'default' => NULL,
           'table_name' => 'civicrm_event',
           'entity' => 'Event',
           'bao' => 'CRM_Event_BAO_Event',
@@ -1014,6 +999,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is this a PAID event?'),
           'description' => ts('If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_monetary',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1075,6 +1061,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Map Enabled'),
           'description' => ts('Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_map',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1091,6 +1078,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is Active'),
           'description' => ts('Is this Event enabled or disabled/cancelled?'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_active',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1124,8 +1112,9 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
         'is_show_location' => [
           'name' => 'is_show_location',
           'type' => CRM_Utils_Type::T_BOOLEAN,
-          'title' => ts('show location'),
+          'title' => ts('Show Location'),
           'description' => ts('If true, show event location.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_show_location',
           'default' => '1',
           'table_name' => 'civicrm_event',
@@ -1266,6 +1255,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is confirm email'),
           'description' => ts('If true, confirmation is automatically emailed to contact on successful registration.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_email_confirm',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1445,6 +1435,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Pay Later Allowed'),
           'description' => ts('if true - allows the user to send payment directly to the org later'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_pay_later',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1491,6 +1482,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Partial Payments Enabled'),
           'description' => ts('is partial payment enabled for this event'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_partial_payment',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1558,6 +1550,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Allow Multiple Registrations'),
           'description' => ts('if true - allows the user to register multiple participants for event'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_multiple_registrations',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1587,6 +1580,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Does Event allow multiple registrations from same email address?'),
           'description' => ts('if true - allows the user to register multiple registrations from same email address.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.allow_same_participant_emails',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1603,7 +1597,9 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Waitlist Enabled'),
           'description' => ts('Whether the event has waitlist support.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.has_waitlist',
+          'default' => '0',
           'table_name' => 'civicrm_event',
           'entity' => 'Event',
           'bao' => 'CRM_Event_BAO_Event',
@@ -1618,7 +1614,9 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Requires Approval'),
           'description' => ts('Whether participants require approval before they can finish registering.'),
+          'required' => TRUE,
           'where' => 'civicrm_event.requires_approval',
+          'default' => '0',
           'table_name' => 'civicrm_event',
           'entity' => 'Event',
           'bao' => 'CRM_Event_BAO_Event',
@@ -1650,6 +1648,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Allow Self-service Cancellation or Transfer'),
           'description' => ts('Allow self service cancellation or transfer for event?'),
+          'required' => TRUE,
           'where' => 'civicrm_event.allow_selfcancelxfer',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1836,6 +1835,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is shared through social media'),
           'description' => ts('Can people share the event through social media?'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_share',
           'default' => '1',
           'table_name' => 'civicrm_event',
@@ -1852,6 +1852,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is the booking confirmation screen enabled?'),
           'description' => ts('If false, the event booking confirmation screen gets skipped'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_confirm_enabled',
           'default' => '1',
           'table_name' => 'civicrm_event',
@@ -1924,6 +1925,7 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is billing block required'),
           'description' => ts('if true than billing block is required this event'),
+          'required' => TRUE,
           'where' => 'civicrm_event.is_billing_required',
           'default' => '0',
           'table_name' => 'civicrm_event',
@@ -1935,27 +1937,6 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO {
           ],
           'add' => '4.6',
         ],
-        'event_tz' => [
-          'name' => 'event_tz',
-          'type' => CRM_Utils_Type::T_TEXT,
-          'title' => ts('Event Time Zone'),
-          'description' => ts('Event\'s native time zone'),
-          'import' => TRUE,
-          'where' => 'civicrm_event.event_tz',
-          'export' => TRUE,
-          'default' => NULL,
-          'table_name' => 'civicrm_event',
-          'entity' => 'Event',
-          'bao' => 'CRM_Event_BAO_Event',
-          'localizable' => 0,
-          'html' => [
-            'type' => 'Select',
-          ],
-          'pseudoconstant' => [
-            'callback' => 'CRM_Core_SelectValues::timezone',
-          ],
-          'add' => '5.47',
-        ],
       ];
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
     }