*
* Generated from xml/schema/CRM/Contribute/Contribution.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:f4c8d34b6650ac5eafbfbd3d6b8a51ca)
+ * (GenCodeChecksum:3e387ab5c998da1bbb367ed526e84289)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
+/**
+ * CRM_Contribute_DAO_Contribution constructor.
+ */
class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
/**
- * static instance to hold the table name
+ * Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_contribution';
/**
- * 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 $revenue_recognition_date;
/**
- * class constructor
- *
- * @return civicrm_contribution
+ * Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_contribution';
parent::__construct();
}
/**
- * Returns foreign keys and entity references
+ * Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
) ,
'contribution_contact_id' => array(
'name' => 'contact_id',
'headerPattern' => '/contact(.?id)?/i',
'dataPattern' => '/^\d+$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'FKClassName' => 'CRM_Contact_DAO_Contact',
'html' => array(
'type' => 'EntityRef',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Type') ,
'description' => 'FK to Financial Type for (total_amount - non_deductible_amount).',
- 'export' => false,
+ 'export' => true,
'where' => 'civicrm_contribution.financial_type_id',
'headerPattern' => '',
'dataPattern' => '',
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'FKClassName' => 'CRM_Financial_DAO_FinancialType',
'html' => array(
'type' => 'Select',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
'html' => array(
'type' => 'Select',
'payment_instrument_id' => array(
'name' => 'payment_instrument_id',
'type' => CRM_Utils_Type::T_INT,
- 'title' => ts('Payment Method') ,
+ 'title' => ts('Payment Method ID') ,
'description' => 'FK to Payment Instrument',
+ 'export' => true,
+ 'where' => 'civicrm_contribution.payment_instrument_id',
+ 'headerPattern' => '/^payment|(p(ayment\s)?instrument)$/i',
+ 'dataPattern' => '',
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select',
) ,
'headerPattern' => '/receive(.?date)?/i',
'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select Date',
+ 'formatType' => 'activityDateTime',
) ,
) ,
'non_deductible_amount' => array(
'headerPattern' => '/non?.?deduct/i',
'dataPattern' => '/^\d+(\.\d{2})?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/^total|(.?^am(ou)?nt)/i',
'dataPattern' => '/^\d+(\.\d{2})?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/fee(.?am(ou)?nt)?/i',
'dataPattern' => '/^\d+(\.\d{2})?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/net(.?am(ou)?nt)?/i',
'dataPattern' => '/^\d+(\.\d{2})?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/tr(ansactio|x)n(.?id)?/i',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/invoice(.?id)?/i',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'dataPattern' => '/^[A-Z]{3}$/i',
'export' => true,
'default' => 'NULL',
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select',
) ,
'headerPattern' => '/cancel(.?date)?/i',
'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select Date',
+ 'formatType' => 'activityDateTime',
) ,
) ,
'cancel_reason' => array(
'headerPattern' => '/(cancel.?)?reason/i',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/receipt(.?date)?/i',
'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select Date',
+ 'formatType' => 'activityDateTime',
) ,
) ,
'thankyou_date' => array(
'headerPattern' => '/thank(s|(.?you))?(.?date)?/i',
'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select Date',
+ 'formatType' => 'activityDateTime',
) ,
) ,
'contribution_source' => array(
'headerPattern' => '/source/i',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Recurring Contribution ID') ,
'description' => 'Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.',
+ 'export' => true,
+ 'where' => 'civicrm_contribution.contribution_recur_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'FKClassName' => 'CRM_Contribute_DAO_ContributionRecur',
) ,
'is_test' => array(
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'CheckBox',
) ,
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'CheckBox',
) ,
'dataPattern' => '',
'export' => true,
'default' => '1',
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select',
) ,
'optionEditPath' => 'civicrm/admin/options/contribution_status',
)
) ,
- 'address_id' => array(
+ 'contribution_address_id' => array(
'name' => 'address_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Contribution Address') ,
'description' => 'Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.',
+ 'export' => true,
+ 'where' => 'civicrm_contribution.address_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'FKClassName' => 'CRM_Core_DAO_Address',
) ,
- 'check_number' => array(
+ 'contribution_check_number' => array(
'name' => 'check_number',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Check Number') ,
'headerPattern' => '/check(.?number)?/i',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'FKClassName' => 'CRM_Campaign_DAO_Campaign',
'html' => array(
'type' => 'Select',
'headerPattern' => '/creditnote(.?id)?/i',
'dataPattern' => '',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/tax(.?am(ou)?nt)?/i',
'dataPattern' => '/^\d+(\.\d{2})?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Text',
) ,
'headerPattern' => '/revenue(.?date)?/i',
'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
'export' => true,
+ 'table_name' => 'civicrm_contribution',
+ 'entity' => 'Contribution',
+ 'bao' => 'CRM_Contribute_BAO_Contribution',
'html' => array(
'type' => 'Select Date',
+ 'formatType' => 'activityDateTime',
) ,
) ,
);