First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,238 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/Currency.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:8cf9dbd2493448f02e1173d686b98fbb)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_Currency constructor.
*/
class CRM_Financial_DAO_Currency extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_currency';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* Currency Id
*
* @var int unsigned
*/
public $id;
/**
* Currency Name
*
* @var string
*/
public $name;
/**
* Currency Symbol
*
* @var string
*/
public $symbol;
/**
* Numeric currency code
*
* @var string
*/
public $numeric_code;
/**
* Full currency name
*
* @var string
*/
public $full_name;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_currency';
parent::__construct();
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Currency ID') ,
'description' => 'Currency Id',
'required' => true,
'table_name' => 'civicrm_currency',
'entity' => 'Currency',
'bao' => 'CRM_Financial_DAO_Currency',
'localizable' => 0,
) ,
'name' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Currency') ,
'description' => 'Currency Name',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'import' => true,
'where' => 'civicrm_currency.name',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_currency',
'entity' => 'Currency',
'bao' => 'CRM_Financial_DAO_Currency',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'symbol' => array(
'name' => 'symbol',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Currency Symbol') ,
'description' => 'Currency Symbol',
'maxlength' => 8,
'size' => CRM_Utils_Type::EIGHT,
'table_name' => 'civicrm_currency',
'entity' => 'Currency',
'bao' => 'CRM_Financial_DAO_Currency',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'numeric_code' => array(
'name' => 'numeric_code',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Currency Numeric Code') ,
'description' => 'Numeric currency code',
'maxlength' => 3,
'size' => CRM_Utils_Type::FOUR,
'import' => true,
'where' => 'civicrm_currency.numeric_code',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_currency',
'entity' => 'Currency',
'bao' => 'CRM_Financial_DAO_Currency',
'localizable' => 0,
) ,
'full_name' => array(
'name' => 'full_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Full Currency Name') ,
'description' => 'Full currency name',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'table_name' => 'civicrm_currency',
'entity' => 'Currency',
'bao' => 'CRM_Financial_DAO_Currency',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'currency', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'currency', $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;
}
}

View file

@ -0,0 +1,265 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/EntityFinancialAccount.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:b9e9a095e5a6631dd7104828d40ec55a)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_EntityFinancialAccount constructor.
*/
class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_entity_financial_account';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* ID
*
* @var int unsigned
*/
public $id;
/**
* Links to an entity_table like civicrm_financial_type
*
* @var string
*/
public $entity_table;
/**
* Links to an id in the entity_table, such as vid in civicrm_financial_type
*
* @var int unsigned
*/
public $entity_id;
/**
* FK to a new civicrm_option_value (account_relationship)
*
* @var int unsigned
*/
public $account_relationship;
/**
* FK to the financial_account_id
*
* @var int unsigned
*/
public $financial_account_id;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_entity_financial_account';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_account_id', 'civicrm_financial_account', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Entity Financial Account ID') ,
'description' => 'ID',
'required' => true,
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
'localizable' => 0,
) ,
'entity_table' => array(
'name' => 'entity_table',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Entity Table') ,
'description' => 'Links to an entity_table like civicrm_financial_type',
'required' => true,
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'import' => true,
'where' => 'civicrm_entity_financial_account.entity_table',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
'localizable' => 0,
) ,
'entity_id' => array(
'name' => 'entity_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Entity ID') ,
'description' => 'Links to an id in the entity_table, such as vid in civicrm_financial_type',
'required' => true,
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
'localizable' => 0,
) ,
'account_relationship' => array(
'name' => 'account_relationship',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Account Relationship') ,
'description' => 'FK to a new civicrm_option_value (account_relationship)',
'required' => true,
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'optionGroupName' => 'account_relationship',
'optionEditPath' => 'civicrm/admin/options/account_relationship',
)
) ,
'financial_account_id' => array(
'name' => 'financial_account_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Account') ,
'description' => 'FK to the financial_account_id',
'required' => true,
'table_name' => 'civicrm_entity_financial_account',
'entity' => 'EntityFinancialAccount',
'bao' => 'CRM_Financial_DAO_EntityFinancialAccount',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_financial_account',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'entity_financial_account', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'entity_financial_account', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'index_entity_id_entity_table_account_relationship' => array(
'name' => 'index_entity_id_entity_table_account_relationship',
'field' => array(
0 => 'entity_id',
1 => 'entity_table',
2 => 'account_relationship',
) ,
'localizable' => false,
'unique' => true,
'sig' => 'civicrm_entity_financial_account::1::entity_id::entity_table::account_relationship',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,259 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/EntityFinancialTrxn.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:8650c2685e9d125bed6f9b65ce208621)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_EntityFinancialTrxn constructor.
*/
class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_entity_financial_trxn';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = false;
/**
* ID
*
* @var int unsigned
*/
public $id;
/**
* May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc
*
* @var string
*/
public $entity_table;
/**
*
* @var int unsigned
*/
public $entity_id;
/**
*
* @var int unsigned
*/
public $financial_trxn_id;
/**
* allocated amount of transaction to this entity
*
* @var float
*/
public $amount;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_entity_financial_trxn';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_trxn_id', 'civicrm_financial_trxn', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Entity Financial Transaction ID') ,
'description' => 'ID',
'required' => true,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'localizable' => 0,
) ,
'entity_table' => array(
'name' => 'entity_table',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Entity Table') ,
'description' => 'May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc',
'required' => true,
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'import' => true,
'where' => 'civicrm_entity_financial_trxn.entity_table',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'localizable' => 0,
) ,
'entity_id' => array(
'name' => 'entity_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Entity ID') ,
'required' => true,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'localizable' => 0,
) ,
'financial_trxn_id' => array(
'name' => 'financial_trxn_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Transaction Id') ,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialTrxn',
) ,
'amount' => array(
'name' => 'amount',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('Amount') ,
'description' => 'allocated amount of transaction to this entity',
'required' => true,
'precision' => array(
20,
2
) ,
'import' => true,
'where' => 'civicrm_entity_financial_trxn.amount',
'headerPattern' => '/amount/i',
'dataPattern' => '/^\d+(\.\d{2})?$/',
'export' => true,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'entity_financial_trxn', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'entity_financial_trxn', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'UI_entity_financial_trxn_entity_table' => array(
'name' => 'UI_entity_financial_trxn_entity_table',
'field' => array(
0 => 'entity_table',
) ,
'localizable' => false,
'sig' => 'civicrm_entity_financial_trxn::0::entity_table',
) ,
'UI_entity_financial_trxn_entity_id' => array(
'name' => 'UI_entity_financial_trxn_entity_id',
'field' => array(
0 => 'entity_id',
) ,
'localizable' => false,
'sig' => 'civicrm_entity_financial_trxn::0::entity_id',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,429 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/FinancialAccount.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:4b1497d1607b10f8eec89c101665cd1d)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_FinancialAccount constructor.
*/
class CRM_Financial_DAO_FinancialAccount extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_financial_account';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* ID
*
* @var int unsigned
*/
public $id;
/**
* Financial Account Name.
*
* @var string
*/
public $name;
/**
* FK to Contact ID that is responsible for the funds in this account
*
* @var int unsigned
*/
public $contact_id;
/**
* pseudo FK into civicrm_option_value.
*
* @var int unsigned
*/
public $financial_account_type_id;
/**
* Optional value for mapping monies owed and received to accounting system codes.
*
* @var string
*/
public $accounting_code;
/**
* Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).
*
* @var string
*/
public $account_type_code;
/**
* Financial Type Description.
*
* @var string
*/
public $description;
/**
* Parent ID in account hierarchy
*
* @var int unsigned
*/
public $parent_id;
/**
* Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?
*
* @var boolean
*/
public $is_header_account;
/**
* Is this account tax-deductible?
*
* @var boolean
*/
public $is_deductible;
/**
* Is this account for taxes?
*
* @var boolean
*/
public $is_tax;
/**
* The percentage of the total_amount that is due for this tax.
*
* @var float
*/
public $tax_rate;
/**
* Is this a predefined system object?
*
* @var boolean
*/
public $is_reserved;
/**
* Is this property active?
*
* @var boolean
*/
public $is_active;
/**
* Is this account the default one (or default tax one) for its financial_account_type?
*
* @var boolean
*/
public $is_default;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_financial_account';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_financial_account', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Account ID') ,
'description' => 'ID',
'required' => true,
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'name' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Financial Account Name') ,
'description' => 'Financial Account Name.',
'required' => true,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'financial_account_contact_id' => array(
'name' => 'contact_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Contact ID') ,
'description' => 'FK to Contact ID that is responsible for the funds in this account',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
) ,
'financial_account_type_id' => array(
'name' => 'financial_account_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Account Type') ,
'description' => 'pseudo FK into civicrm_option_value.',
'required' => true,
'default' => '3',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'optionGroupName' => 'financial_account_type',
'optionEditPath' => 'civicrm/admin/options/financial_account_type',
)
) ,
'accounting_code' => array(
'name' => 'accounting_code',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Accounting Code') ,
'description' => 'Optional value for mapping monies owed and received to accounting system codes.',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'export' => true,
'where' => 'civicrm_financial_account.accounting_code',
'headerPattern' => '',
'dataPattern' => '',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'account_type_code' => array(
'name' => 'account_type_code',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Account Type Code') ,
'description' => 'Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'export' => true,
'where' => 'civicrm_financial_account.account_type_code',
'headerPattern' => '',
'dataPattern' => '',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'description' => array(
'name' => 'description',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Financial Account Description') ,
'description' => 'Financial Type Description.',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'parent_id' => array(
'name' => 'parent_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Account Parent') ,
'description' => 'Parent ID in account hierarchy',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
) ,
'is_header_account' => array(
'name' => 'is_header_account',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Header Financial Account?') ,
'description' => 'Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'is_deductible' => array(
'name' => 'is_deductible',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Deductible Financial Account?') ,
'description' => 'Is this account tax-deductible?',
'default' => '1',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'is_tax' => array(
'name' => 'is_tax',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Tax Financial Account?') ,
'description' => 'Is this account for taxes?',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'tax_rate' => array(
'name' => 'tax_rate',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('Financial Account Tax Rate') ,
'description' => 'The percentage of the total_amount that is due for this tax.',
'precision' => array(
10,
8
) ,
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'is_reserved' => array(
'name' => 'is_reserved',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Reserved Financial Account?') ,
'description' => 'Is this a predefined system object?',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'is_active' => array(
'name' => 'is_active',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Financial Account is Active') ,
'description' => 'Is this property active?',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
'is_default' => array(
'name' => 'is_default',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Default Financial Account') ,
'description' => 'Is this account the default one (or default tax one) for its financial_account_type?',
'table_name' => 'civicrm_financial_account',
'entity' => 'FinancialAccount',
'bao' => 'CRM_Financial_BAO_FinancialAccount',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_account', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_account', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'UI_name' => array(
'name' => 'UI_name',
'field' => array(
0 => 'name',
) ,
'localizable' => false,
'unique' => true,
'sig' => 'civicrm_financial_account::1::name',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,400 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/FinancialItem.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (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.
*
* @var string
*/
static $_tableName = 'civicrm_financial_item';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
*
* @var int unsigned
*/
public $id;
/**
* Date and time the item was created
*
* @var timestamp
*/
public $created_date;
/**
* Date and time of the source transaction
*
* @var datetime
*/
public $transaction_date;
/**
* FK to Contact ID of contact the item is from
*
* @var int unsigned
*/
public $contact_id;
/**
* Human readable description of this item, to ease display without lookup of source item.
*
* @var string
*/
public $description;
/**
* Total amount of this item
*
* @var float
*/
public $amount;
/**
* Currency for the amount
*
* @var string
*/
public $currency;
/**
* FK to civicrm_financial_account
*
* @var int unsigned
*/
public $financial_account_id;
/**
* Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
*
* @var int unsigned
*/
public $status_id;
/**
* The table providing the source of this item such as civicrm_line_item
*
* @var string
*/
public $entity_table;
/**
* The specific source item that is responsible for the creation of this financial_item
*
* @var int unsigned
*/
public $entity_id;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_financial_item';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_account_id', 'civicrm_financial_account', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'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',
'type' => CRM_Utils_Type::T_TIMESTAMP,
'title' => ts('Financial Item 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',
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
'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',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Item Contact ID') ,
'description' => 'FK to Contact ID of contact the item is from',
'required' => true,
'export' => true,
'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(
'name' => 'description',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Financial Item Description') ,
'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',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('Amount') ,
'description' => 'Total amount of this item',
'required' => true,
'precision' => array(
20,
2
) ,
'table_name' => 'civicrm_financial_item',
'entity' => 'FinancialItem',
'bao' => 'CRM_Financial_BAO_FinancialItem',
'localizable' => 0,
) ,
'currency' => array(
'name' => 'currency',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Financial Item Currency') ,
'description' => 'Currency for the amount',
'maxlength' => 3,
'size' => CRM_Utils_Type::FOUR,
'export' => true,
'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',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_currency',
'keyColumn' => 'name',
'labelColumn' => 'full_name',
'nameColumn' => 'name',
)
) ,
'financial_account_id' => array(
'name' => 'financial_account_id',
'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',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_financial_account',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
'status_id' => array(
'name' => 'status_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Item Status ID') ,
'description' => 'Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)',
'export' => true,
'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',
) ,
'pseudoconstant' => array(
'optionGroupName' => 'financial_item_status',
'optionEditPath' => 'civicrm/admin/options/financial_item_status',
)
) ,
'entity_table' => array(
'name' => 'entity_table',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Entity Table') ,
'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']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_item', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$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;
}
}

View file

@ -0,0 +1,541 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/FinancialTrxn.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:21185c4929ef1a8d126c72733cc7ad1d)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_FinancialTrxn constructor.
*/
class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_financial_trxn';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
*
* @var int unsigned
*/
public $id;
/**
* FK to financial_account table.
*
* @var int unsigned
*/
public $from_financial_account_id;
/**
* FK to financial_financial_account table.
*
* @var int unsigned
*/
public $to_financial_account_id;
/**
* date transaction occurred
*
* @var datetime
*/
public $trxn_date;
/**
* amount of transaction
*
* @var float
*/
public $total_amount;
/**
* actual processor fee if known - may be 0.
*
* @var float
*/
public $fee_amount;
/**
* actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
*
* @var float
*/
public $net_amount;
/**
* 3 character string, value from config setting or input via user.
*
* @var string
*/
public $currency;
/**
* Is this entry either a payment or a reversal of a payment?
*
* @var boolean
*/
public $is_payment;
/**
* Transaction id supplied by external processor. This may not be unique.
*
* @var string
*/
public $trxn_id;
/**
* processor result code
*
* @var string
*/
public $trxn_result_code;
/**
* pseudo FK to civicrm_option_value of contribution_status_id option_group
*
* @var int unsigned
*/
public $status_id;
/**
* Payment Processor for this financial transaction
*
* @var int unsigned
*/
public $payment_processor_id;
/**
* FK to payment_instrument option group values
*
* @var int unsigned
*/
public $payment_instrument_id;
/**
* FK to accept_creditcard option group values
*
* @var int unsigned
*/
public $card_type_id;
/**
* Check number
*
* @var string
*/
public $check_number;
/**
* Last 4 digits of credit card
*
* @var string
*/
public $pan_truncation;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_financial_trxn';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'from_financial_account_id', 'civicrm_financial_account', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'to_financial_account_id', 'civicrm_financial_account', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_id', 'civicrm_payment_processor', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Transaction ID') ,
'required' => true,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
) ,
'from_financial_account_id' => array(
'name' => 'from_financial_account_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Transaction From Account') ,
'description' => 'FK to financial_account table.',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_financial_account',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
'to_financial_account_id' => array(
'name' => 'to_financial_account_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Transaction To Account') ,
'description' => 'FK to financial_financial_account table.',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_financial_account',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
'trxn_date' => array(
'name' => 'trxn_date',
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
'title' => ts('Financial Transaction Date') ,
'description' => 'date transaction occurred',
'default' => 'NULL',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'html' => array(
'type' => 'Select Date',
'formatType' => 'activityDateTime',
) ,
) ,
'total_amount' => array(
'name' => 'total_amount',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('Financial Total Amount') ,
'description' => 'amount of transaction',
'required' => true,
'precision' => array(
20,
2
) ,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
) ,
'fee_amount' => array(
'name' => 'fee_amount',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('Financial Fee Amount') ,
'description' => 'actual processor fee if known - may be 0.',
'precision' => array(
20,
2
) ,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
) ,
'net_amount' => array(
'name' => 'net_amount',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('Financial Net Amount') ,
'description' => 'actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.',
'precision' => array(
20,
2
) ,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
) ,
'currency' => array(
'name' => 'currency',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Financial Currency') ,
'description' => '3 character string, value from config setting or input via user.',
'maxlength' => 3,
'size' => CRM_Utils_Type::FOUR,
'import' => true,
'where' => 'civicrm_financial_trxn.currency',
'headerPattern' => '/cur(rency)?/i',
'dataPattern' => '/^[A-Z]{3}$/',
'export' => true,
'default' => 'NULL',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_currency',
'keyColumn' => 'name',
'labelColumn' => 'full_name',
'nameColumn' => 'name',
)
) ,
'is_payment' => array(
'name' => 'is_payment',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Payment?') ,
'description' => 'Is this entry either a payment or a reversal of a payment?',
'import' => true,
'where' => 'civicrm_financial_trxn.is_payment',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
) ,
'trxn_id' => array(
'name' => 'trxn_id',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Transaction ID') ,
'description' => 'Transaction id supplied by external processor. This may not be unique.',
'maxlength' => 255,
'size' => 10,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'trxn_result_code' => array(
'name' => 'trxn_result_code',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Transaction Result Code') ,
'description' => 'processor result code',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
) ,
'status_id' => array(
'name' => 'status_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Transaction Status Id') ,
'description' => 'pseudo FK to civicrm_option_value of contribution_status_id option_group',
'import' => true,
'where' => 'civicrm_financial_trxn.status_id',
'headerPattern' => '/status/i',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'pseudoconstant' => array(
'optionGroupName' => 'contribution_status',
'optionEditPath' => 'civicrm/admin/options/contribution_status',
)
) ,
'payment_processor_id' => array(
'name' => 'payment_processor_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Processor') ,
'description' => 'Payment Processor for this financial transaction',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_PaymentProcessor',
) ,
'financial_trxn_payment_instrument_id' => array(
'name' => 'payment_instrument_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Method') ,
'description' => 'FK to payment_instrument option group values',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'optionGroupName' => 'payment_instrument',
'optionEditPath' => 'civicrm/admin/options/payment_instrument',
)
) ,
'financial_trxn_card_type_id' => array(
'name' => 'card_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Card Type ID') ,
'description' => 'FK to accept_creditcard option group values',
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'optionGroupName' => 'accept_creditcard',
'optionEditPath' => 'civicrm/admin/options/accept_creditcard',
)
) ,
'financial_trxn_check_number' => array(
'name' => 'check_number',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Check Number') ,
'description' => 'Check number',
'maxlength' => 255,
'size' => 6,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'financial_trxn_pan_truncation' => array(
'name' => 'pan_truncation',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Pan Truncation') ,
'description' => 'Last 4 digits of credit card',
'maxlength' => 4,
'size' => 4,
'table_name' => 'civicrm_financial_trxn',
'entity' => 'FinancialTrxn',
'bao' => 'CRM_Financial_DAO_FinancialTrxn',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_trxn', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_trxn', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'UI_ftrxn_trxn_id' => array(
'name' => 'UI_ftrxn_trxn_id',
'field' => array(
0 => 'trxn_id',
) ,
'localizable' => false,
'sig' => 'civicrm_financial_trxn::0::trxn_id',
) ,
'UI_ftrxn_payment_instrument_id' => array(
'name' => 'UI_ftrxn_payment_instrument_id',
'field' => array(
0 => 'payment_instrument_id',
) ,
'localizable' => false,
'sig' => 'civicrm_financial_trxn::0::payment_instrument_id',
) ,
'UI_ftrxn_check_number' => array(
'name' => 'UI_ftrxn_check_number',
'field' => array(
0 => 'check_number',
) ,
'localizable' => false,
'sig' => 'civicrm_financial_trxn::0::check_number',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,248 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/FinancialType.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:9d787931917508983d68631821eea721)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_FinancialType constructor.
*/
class CRM_Financial_DAO_FinancialType extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_financial_type';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* ID of original financial_type so you can search this table by the financial_type.id and then select the relevant version based on the timestamp
*
* @var int unsigned
*/
public $id;
/**
* Financial Type Name.
*
* @var string
*/
public $name;
/**
* Financial Type Description.
*
* @var string
*/
public $description;
/**
* Is this financial type tax-deductible? If true, contributions of this type may be fully OR partially deductible - non-deductible amount is stored in the Contribution record.
*
* @var boolean
*/
public $is_deductible;
/**
* Is this a predefined system object?
*
* @var boolean
*/
public $is_reserved;
/**
* Is this property active?
*
* @var boolean
*/
public $is_active;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_financial_type';
parent::__construct();
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Type ID') ,
'description' => 'ID of original financial_type so you can search this table by the financial_type.id and then select the relevant version based on the timestamp',
'required' => true,
'table_name' => 'civicrm_financial_type',
'entity' => 'FinancialType',
'bao' => 'CRM_Financial_BAO_FinancialType',
'localizable' => 0,
) ,
'financial_type' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Financial Type') ,
'description' => 'Financial Type Name.',
'required' => true,
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'import' => true,
'where' => 'civicrm_financial_type.name',
'headerPattern' => '/(finan(cial)?)?type/i',
'dataPattern' => '/donation|member|campaign/i',
'export' => true,
'table_name' => 'civicrm_financial_type',
'entity' => 'FinancialType',
'bao' => 'CRM_Financial_BAO_FinancialType',
'localizable' => 0,
) ,
'description' => array(
'name' => 'description',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Description') ,
'description' => 'Financial Type Description.',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_financial_type',
'entity' => 'FinancialType',
'bao' => 'CRM_Financial_BAO_FinancialType',
'localizable' => 0,
) ,
'is_deductible' => array(
'name' => 'is_deductible',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Tax Deductible?') ,
'description' => 'Is this financial type tax-deductible? If true, contributions of this type may be fully OR partially deductible - non-deductible amount is stored in the Contribution record.',
'default' => '1',
'table_name' => 'civicrm_financial_type',
'entity' => 'FinancialType',
'bao' => 'CRM_Financial_BAO_FinancialType',
'localizable' => 0,
) ,
'is_reserved' => array(
'name' => 'is_reserved',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Financial Type is Reserved?') ,
'description' => 'Is this a predefined system object?',
'table_name' => 'civicrm_financial_type',
'entity' => 'FinancialType',
'bao' => 'CRM_Financial_BAO_FinancialType',
'localizable' => 0,
) ,
'is_active' => array(
'name' => 'is_active',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Financial Type Is Active?') ,
'description' => 'Is this property active?',
'table_name' => 'civicrm_financial_type',
'entity' => 'FinancialType',
'bao' => 'CRM_Financial_BAO_FinancialType',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'financial_type', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_type', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'UI_id' => array(
'name' => 'UI_id',
'field' => array(
0 => 'id',
) ,
'localizable' => false,
'unique' => true,
'sig' => 'civicrm_financial_type::1::id',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,560 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:223b44e4b9e2994f724d2dbd79f575e4)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_PaymentProcessor constructor.
*/
class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_payment_processor';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = false;
/**
* Payment Processor ID
*
* @var int unsigned
*/
public $id;
/**
* Which Domain is this match entry for
*
* @var int unsigned
*/
public $domain_id;
/**
* Payment Processor Name.
*
* @var string
*/
public $name;
/**
* Payment Processor Description.
*
* @var string
*/
public $description;
/**
*
* @var int unsigned
*/
public $payment_processor_type_id;
/**
* Is this processor active?
*
* @var boolean
*/
public $is_active;
/**
* Is this processor the default?
*
* @var boolean
*/
public $is_default;
/**
* Is this processor for a test site?
*
* @var boolean
*/
public $is_test;
/**
*
* @var string
*/
public $user_name;
/**
*
* @var string
*/
public $password;
/**
*
* @var text
*/
public $signature;
/**
*
* @var string
*/
public $url_site;
/**
*
* @var string
*/
public $url_api;
/**
*
* @var string
*/
public $url_recur;
/**
*
* @var string
*/
public $url_button;
/**
*
* @var string
*/
public $subject;
/**
*
* @var string
*/
public $class_name;
/**
* Billing Mode (deprecated)
*
* @var int unsigned
*/
public $billing_mode;
/**
* Can process recurring contributions
*
* @var boolean
*/
public $is_recur;
/**
* Payment Type: Credit or Debit (deprecated)
*
* @var int unsigned
*/
public $payment_type;
/**
* Payment Instrument ID
*
* @var int unsigned
*/
public $payment_instrument_id;
/**
* array of accepted credit card types
*
* @var text
*/
public $accepted_credit_cards;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_payment_processor';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Processor ID') ,
'description' => 'Payment Processor ID',
'required' => true,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'domain_id' => array(
'name' => 'domain_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Processor Domain') ,
'description' => 'Which Domain is this match entry for',
'required' => true,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'FKClassName' => 'CRM_Core_DAO_Domain',
'pseudoconstant' => array(
'table' => 'civicrm_domain',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
'name' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Payment Processor') ,
'description' => 'Payment Processor Name.',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'description' => array(
'name' => 'description',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Processor Description') ,
'description' => 'Payment Processor Description.',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'payment_processor_type_id' => array(
'name' => 'payment_processor_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Processor Type ID') ,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
'pseudoconstant' => array(
'table' => 'civicrm_payment_processor_type',
'keyColumn' => 'id',
'labelColumn' => 'title',
)
) ,
'is_active' => array(
'name' => 'is_active',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Processor is Active?') ,
'description' => 'Is this processor active?',
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'is_default' => array(
'name' => 'is_default',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Processor Is Default?') ,
'description' => 'Is this processor the default?',
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'is_test' => array(
'name' => 'is_test',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Test Processor?') ,
'description' => 'Is this processor for a test site?',
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'user_name' => array(
'name' => 'user_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('User Name') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'password' => array(
'name' => 'password',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Password') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Password',
) ,
) ,
'signature' => array(
'name' => 'signature',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Signature') ,
'rows' => 4,
'cols' => 40,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'TextArea',
) ,
) ,
'url_site' => array(
'name' => 'url_site',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Site URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'url_api' => array(
'name' => 'url_api',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('API URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'url_recur' => array(
'name' => 'url_recur',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Recurring Payments URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'url_button' => array(
'name' => 'url_button',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Button URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'subject' => array(
'name' => 'subject',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Subject') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'class_name' => array(
'name' => 'class_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Suffix for PHP class name implementation') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'billing_mode' => array(
'name' => 'billing_mode',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Processor Billing Mode') ,
'description' => 'Billing Mode (deprecated)',
'required' => true,
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'is_recur' => array(
'name' => 'is_recur',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Processor Supports Recurring?') ,
'description' => 'Can process recurring contributions',
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'payment_type' => array(
'name' => 'payment_type',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Type') ,
'description' => 'Payment Type: Credit or Debit (deprecated)',
'default' => '1',
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
'payment_instrument_id' => array(
'name' => 'payment_instrument_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Method') ,
'description' => 'Payment Instrument ID',
'default' => '1',
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'pseudoconstant' => array(
'optionGroupName' => 'payment_instrument',
'optionEditPath' => 'civicrm/admin/options/payment_instrument',
)
) ,
'accepted_credit_cards' => array(
'name' => 'accepted_credit_cards',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Accepted Credit Cards') ,
'description' => 'array of accepted credit card types',
'default' => 'NULL',
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'UI_name_test_domain_id' => array(
'name' => 'UI_name_test_domain_id',
'field' => array(
0 => 'name',
1 => 'is_test',
2 => 'domain_id',
) ,
'localizable' => false,
'unique' => true,
'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,528 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/PaymentProcessorType.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:b47064fa57473507062b1e69983ccc52)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_PaymentProcessorType constructor.
*/
class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_payment_processor_type';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = false;
/**
* Payment Processor Type ID
*
* @var int unsigned
*/
public $id;
/**
* Payment Processor Name.
*
* @var string
*/
public $name;
/**
* Payment Processor Name.
*
* @var string
*/
public $title;
/**
* Payment Processor Description.
*
* @var string
*/
public $description;
/**
* Is this processor active?
*
* @var boolean
*/
public $is_active;
/**
* Is this processor the default?
*
* @var boolean
*/
public $is_default;
/**
*
* @var string
*/
public $user_name_label;
/**
*
* @var string
*/
public $password_label;
/**
*
* @var string
*/
public $signature_label;
/**
*
* @var string
*/
public $subject_label;
/**
*
* @var string
*/
public $class_name;
/**
*
* @var string
*/
public $url_site_default;
/**
*
* @var string
*/
public $url_api_default;
/**
*
* @var string
*/
public $url_recur_default;
/**
*
* @var string
*/
public $url_button_default;
/**
*
* @var string
*/
public $url_site_test_default;
/**
*
* @var string
*/
public $url_api_test_default;
/**
*
* @var string
*/
public $url_recur_test_default;
/**
*
* @var string
*/
public $url_button_test_default;
/**
* Billing Mode (deprecated)
*
* @var int unsigned
*/
public $billing_mode;
/**
* Can process recurring contributions
*
* @var boolean
*/
public $is_recur;
/**
* Payment Type: Credit or Debit (deprecated)
*
* @var int unsigned
*/
public $payment_type;
/**
* Payment Instrument ID
*
* @var int unsigned
*/
public $payment_instrument_id;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_payment_processor_type';
parent::__construct();
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Processor Type ID') ,
'description' => 'Payment Processor Type ID',
'required' => true,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'name' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Payment Processor variable name to be used in code') ,
'description' => 'Payment Processor Name.',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'title' => array(
'name' => 'title',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Payment Processor Title') ,
'description' => 'Payment Processor Name.',
'maxlength' => 127,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'description' => array(
'name' => 'description',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Processor Type Description') ,
'description' => 'Payment Processor Description.',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'is_active' => array(
'name' => 'is_active',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Processor Type Is Active?') ,
'description' => 'Is this processor active?',
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'is_default' => array(
'name' => 'is_default',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Processor Type is Default?') ,
'description' => 'Is this processor the default?',
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'user_name_label' => array(
'name' => 'user_name_label',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Label for User Name if used') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'password_label' => array(
'name' => 'password_label',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Label for password') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'signature_label' => array(
'name' => 'signature_label',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Label for Signature') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'subject_label' => array(
'name' => 'subject_label',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Label for Subject') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'class_name' => array(
'name' => 'class_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Suffix for PHP class name implementation') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_site_default' => array(
'name' => 'url_site_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default Live Site URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_api_default' => array(
'name' => 'url_api_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default API Site URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_recur_default' => array(
'name' => 'url_recur_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default Live Recurring Payments URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_button_default' => array(
'name' => 'url_button_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default Live Button URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_site_test_default' => array(
'name' => 'url_site_test_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default Test Site URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_api_test_default' => array(
'name' => 'url_api_test_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default Test API URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_recur_test_default' => array(
'name' => 'url_recur_test_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default Test Recurring Payment URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'url_button_test_default' => array(
'name' => 'url_button_test_default',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Default Test Button URL') ,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'billing_mode' => array(
'name' => 'billing_mode',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Billing Mode') ,
'description' => 'Billing Mode (deprecated)',
'required' => true,
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::billingMode',
)
) ,
'is_recur' => array(
'name' => 'is_recur',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Processor Type Supports Recurring?') ,
'description' => 'Can process recurring contributions',
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'payment_type' => array(
'name' => 'payment_type',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Processor Type Payment Type') ,
'description' => 'Payment Type: Credit or Debit (deprecated)',
'default' => '1',
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
) ,
'payment_instrument_id' => array(
'name' => 'payment_instrument_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Method') ,
'description' => 'Payment Instrument ID',
'default' => '1',
'table_name' => 'civicrm_payment_processor_type',
'entity' => 'PaymentProcessorType',
'bao' => 'CRM_Financial_BAO_PaymentProcessorType',
'localizable' => 0,
'pseudoconstant' => array(
'optionGroupName' => 'payment_instrument',
'optionEditPath' => 'civicrm/admin/options/payment_instrument',
)
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor_type', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor_type', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'UI_name' => array(
'name' => 'UI_name',
'field' => array(
0 => 'name',
) ,
'localizable' => false,
'unique' => true,
'sig' => 'civicrm_payment_processor_type::1::name',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,374 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Financial/PaymentToken.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:6b3810f34b7a2c1aacecfb67f1d09b42)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Financial_DAO_PaymentToken constructor.
*/
class CRM_Financial_DAO_PaymentToken extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_payment_token';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = false;
/**
* Payment Token ID
*
* @var int unsigned
*/
public $id;
/**
* FK to Contact ID for the owner of the token
*
* @var int unsigned
*/
public $contact_id;
/**
*
* @var int unsigned
*/
public $payment_processor_id;
/**
* Externally provided token string
*
* @var string
*/
public $token;
/**
* Date created
*
* @var timestamp
*/
public $created_date;
/**
* Contact ID of token creator
*
* @var int unsigned
*/
public $created_id;
/**
* Date this token expires
*
* @var datetime
*/
public $expiry_date;
/**
* Email at the time of token creation. Useful for fraud forensics
*
* @var string
*/
public $email;
/**
* Billing first name at the time of token creation. Useful for fraud forensics
*
* @var string
*/
public $billing_first_name;
/**
* Billing middle name at the time of token creation. Useful for fraud forensics
*
* @var string
*/
public $billing_middle_name;
/**
* Billing last name at the time of token creation. Useful for fraud forensics
*
* @var string
*/
public $billing_last_name;
/**
* Holds the part of the card number or account details that may be retained or displayed
*
* @var string
*/
public $masked_account_number;
/**
* IP used when creating the token. Useful for fraud forensics
*
* @var string
*/
public $ip_address;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_payment_token';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_id', 'civicrm_payment_processor', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'payment_token_id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Token ID') ,
'description' => 'Payment Token ID',
'required' => true,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'contact_id' => array(
'name' => 'contact_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Contact ID') ,
'description' => 'FK to Contact ID for the owner of the token',
'required' => true,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
) ,
'payment_processor_id' => array(
'name' => 'payment_processor_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Payment Processor ID') ,
'required' => true,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_PaymentProcessor',
) ,
'token' => array(
'name' => 'token',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Token') ,
'description' => 'Externally provided token string',
'required' => true,
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'created_date' => array(
'name' => 'created_date',
'type' => CRM_Utils_Type::T_TIMESTAMP,
'title' => ts('Created Date') ,
'description' => 'Date created',
'default' => 'CURRENT_TIMESTAMP',
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'created_id' => array(
'name' => 'created_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Created ID') ,
'description' => 'Contact ID of token creator',
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
) ,
'expiry_date' => array(
'name' => 'expiry_date',
'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
'title' => ts('Expiry Date') ,
'description' => 'Date this token expires',
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'email' => array(
'name' => 'email',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Email') ,
'description' => 'Email at the time of token creation. Useful for fraud forensics',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'billing_first_name' => array(
'name' => 'billing_first_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Billing First Name') ,
'description' => 'Billing first name at the time of token creation. Useful for fraud forensics',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'billing_middle_name' => array(
'name' => 'billing_middle_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Billing Middle Name') ,
'description' => 'Billing middle name at the time of token creation. Useful for fraud forensics',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'billing_last_name' => array(
'name' => 'billing_last_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Billing Last Name') ,
'description' => 'Billing last name at the time of token creation. Useful for fraud forensics',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'masked_account_number' => array(
'name' => 'masked_account_number',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Masked Account Number') ,
'description' => 'Holds the part of the card number or account details that may be retained or displayed',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
'ip_address' => array(
'name' => 'ip_address',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('IP Address') ,
'description' => 'IP used when creating the token. Useful for fraud forensics',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_payment_token',
'entity' => 'PaymentToken',
'bao' => 'CRM_Financial_DAO_PaymentToken',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_token', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_token', $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;
}
}