+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2016 |
+| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
*/
/**
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/FinancialItem.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4abc5641f9aab2a8d925cf5898a3a858)
+ * (GenCodeChecksum:95e199969f4ff93ccae635fb7e0d30f2)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
+/**
+ * CRM_Financial_DAO_FinancialItem constructor.
+ */
class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO {
/**
- * static instance to hold the table name
+ * Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_financial_item';
/**
- * 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
*/
*/
public $entity_id;
/**
- * class constructor
- *
- * @return civicrm_financial_item
+ * Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_financial_item';
parent::__construct();
}
/**
- * Returns foreign keys and entity references
+ * Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Item ID') ,
'required' => true,
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
) ,
'created_date' => array(
'name' => 'created_date',
'description' => 'Date and time the item was created',
'required' => true,
'default' => 'CURRENT_TIMESTAMP',
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
) ,
'transaction_date' => array(
'name' => 'transaction_date',
'title' => ts('Financial Item Transaction Date') ,
'description' => 'Date and time of the source transaction',
'required' => true,
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
) ,
'contact_id' => array(
'name' => 'contact_id',
'where' => 'civicrm_financial_item.contact_id',
'headerPattern' => '',
'dataPattern' => '',
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
) ,
'description' => array(
'description' => 'Human readable description of this item, to ease display without lookup of source item.',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
) ,
'amount' => array(
'name' => 'amount',
20,
2
) ,
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
) ,
'currency' => array(
'name' => 'currency',
'where' => 'civicrm_financial_item.currency',
'headerPattern' => '',
'dataPattern' => '',
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Account ID') ,
'description' => 'FK to civicrm_financial_account',
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
'html' => array(
'type' => 'Select',
'where' => 'civicrm_financial_item.status_id',
'headerPattern' => '',
'dataPattern' => '',
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'description' => 'The table providing the source of this item such as civicrm_line_item',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
) ,
'entity_id' => array(
'name' => 'entity_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Entity ID') ,
'description' => 'The specific source item that is responsible for the creation of this financial_item',
+ 'table_name' => 'civicrm_financial_item',
+ 'entity' => 'FinancialItem',
+ 'bao' => 'CRM_Financial_BAO_FinancialItem',
+ 'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_item', $prefix, array());
return $r;
}
+ /**
+ * Returns the list of indices
+ */
+ public static function indices($localize = TRUE) {
+ $indices = array(
+ 'IX_created_date' => array(
+ 'name' => 'IX_created_date',
+ 'field' => array(
+ 0 => 'created_date',
+ ) ,
+ 'localizable' => false,
+ 'sig' => 'civicrm_financial_item::0::created_date',
+ ) ,
+ 'IX_transaction_date' => array(
+ 'name' => 'IX_transaction_date',
+ 'field' => array(
+ 0 => 'transaction_date',
+ ) ,
+ 'localizable' => false,
+ 'sig' => 'civicrm_financial_item::0::transaction_date',
+ ) ,
+ 'index_entity_id_entity_table' => array(
+ 'name' => 'index_entity_id_entity_table',
+ 'field' => array(
+ 0 => 'entity_id',
+ 1 => 'entity_table',
+ ) ,
+ 'localizable' => false,
+ 'sig' => 'civicrm_financial_item::0::entity_id::entity_table',
+ ) ,
+ );
+ return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
+ }
}