46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/*
|
|
* InvoicePlane
|
|
*
|
|
* @author InvoicePlane Developers & Contributors
|
|
* @copyright Copyright (c) 2012 - 2017 InvoicePlane.com
|
|
* @license https://invoiceplane.com/license.txt
|
|
* @link https://invoiceplane.com
|
|
*/
|
|
|
|
/**
|
|
* Class Mdl_Payment_Methods
|
|
*/
|
|
class Mdl_Payment_Methods extends Response_Model
|
|
{
|
|
public $table = 'ip_payment_methods';
|
|
public $primary_key = 'ip_payment_methods.payment_method_id';
|
|
|
|
public function default_select()
|
|
{
|
|
$this->db->select('SQL_CALC_FOUND_ROWS *', false);
|
|
}
|
|
|
|
public function order_by()
|
|
{
|
|
$this->db->order_by('ip_payment_methods.payment_method_name');
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function validation_rules()
|
|
{
|
|
return array(
|
|
'payment_method_name' => array(
|
|
'field' => 'payment_method_name',
|
|
'label' => trans('payment_method'),
|
|
'rules' => 'required'
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|