Example #1
0
 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'contribution_id' => array('name' => 'contribution_id', 'type' => CRM_Utils_Type::T_INT, 'required' => true, 'FKClassName' => 'CRM_Contribute_DAO_Contribution'), 'trxn_date' => array('name' => 'trxn_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Trxn Date'), 'required' => true), 'trxn_type' => array('name' => 'trxn_type', 'type' => CRM_Utils_Type::T_ENUM, 'title' => ts('Trxn Type'), 'required' => true, 'enumValues' => 'Debit,Credit'), 'total_amount' => array('name' => 'total_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Total Amount'), 'required' => true), 'fee_amount' => array('name' => 'fee_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Fee Amount')), 'net_amount' => array('name' => 'net_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Net Amount')), 'currency' => array('name' => 'currency', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Currency'), 'required' => true, 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'import' => true, 'where' => 'civicrm_financial_trxn.currency', 'headerPattern' => '/cur(rency)?/i', 'dataPattern' => '/^[A-Z]{3}$/', 'export' => true), 'payment_processor' => array('name' => 'payment_processor', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Payment Processor'), 'required' => true, 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'trxn_id' => array('name' => 'trxn_id', 'type' => CRM_Utils_Type::T_STRING, 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'trxn_result_code' => array('name' => 'trxn_result_code', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Trxn Result Code'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE));
     }
     return self::$_fields;
 }