API/DAO Metadata - Retain versioning metadata for possible usage in runtime+tooling
[civicrm-core.git] / CRM / Core / DAO / Note.php
index d47f7d40c0b72275d889db75c5fbb0384f1a5575..c5cd339ea7d18af8b695cabff4e86b4714e0f9ad 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Core/Note.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:1a545c1e601969ae689d9577a3c14389)
+ * (GenCodeChecksum:0e43e07bfbf7de4e7fa48f4d24a923fd)
  */
 
 /**
@@ -21,6 +21,13 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
    */
   public static $_tableName = 'civicrm_note';
 
+  /**
+   * Icon associated with this entity.
+   *
+   * @var string
+   */
+  public static $_icon = 'fa-sticky-note';
+
   /**
    * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
@@ -66,7 +73,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
   /**
    * When was this note last modified/edited
    *
-   * @var date
+   * @var timestamp
    */
   public $modified_date;
 
@@ -92,6 +99,13 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
     parent::__construct();
   }
 
+  /**
+   * Returns localized title of this entity.
+   */
+  public static function getEntityTitle() {
+    return ts('Notes');
+  }
+
   /**
    * Returns foreign keys and entity references.
    *
@@ -127,6 +141,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
           'entity' => 'Note',
           'bao' => 'CRM_Core_BAO_Note',
           'localizable' => 0,
+          'add' => '1.1',
         ],
         'entity_table' => [
           'name' => 'entity_table',
@@ -144,6 +159,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
           'pseudoconstant' => [
             'callback' => 'CRM_Core_BAO_Note::entityTables',
           ],
+          'add' => '1.1',
         ],
         'entity_id' => [
           'name' => 'entity_id',
@@ -156,6 +172,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
           'entity' => 'Note',
           'bao' => 'CRM_Core_BAO_Note',
           'localizable' => 0,
+          'add' => '1.1',
         ],
         'note' => [
           'name' => 'note',
@@ -176,6 +193,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
           'html' => [
             'type' => 'TextArea',
           ],
+          'add' => '1.1',
         ],
         'contact_id' => [
           'name' => 'contact_id',
@@ -188,17 +206,20 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
           'bao' => 'CRM_Core_BAO_Note',
           'localizable' => 0,
           'FKClassName' => 'CRM_Contact_DAO_Contact',
+          'add' => '1.1',
         ],
         'modified_date' => [
           'name' => 'modified_date',
-          'type' => CRM_Utils_Type::T_DATE,
+          'type' => CRM_Utils_Type::T_TIMESTAMP,
           'title' => ts('Note Modified By'),
           'description' => ts('When was this note last modified/edited'),
           'where' => 'civicrm_note.modified_date',
+          'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
           'table_name' => 'civicrm_note',
           'entity' => 'Note',
           'bao' => 'CRM_Core_BAO_Note',
           'localizable' => 0,
+          'add' => '1.1',
         ],
         'subject' => [
           'name' => 'subject',
@@ -215,6 +236,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.5',
         ],
         'privacy' => [
           'name' => 'privacy',
@@ -235,6 +257,7 @@ class CRM_Core_DAO_Note extends CRM_Core_DAO {
             'optionGroupName' => 'note_privacy',
             'optionEditPath' => 'civicrm/admin/options/note_privacy',
           ],
+          'add' => '3.3',
         ],
       ];
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);