@@ -3,9 +3,12 @@
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
use App\Models\Concerns\SchoolYearAutoFillTrait;
|
||||
|
||||
class PaymentCorrectionModel extends Model
|
||||
{
|
||||
use SchoolYearAutoFillTrait;
|
||||
|
||||
protected $table = 'payment_corrections';
|
||||
protected $primaryKey = 'id';
|
||||
protected $returnType = 'array';
|
||||
@@ -15,6 +18,7 @@ class PaymentCorrectionModel extends Model
|
||||
'payment_id',
|
||||
'invoice_id',
|
||||
'parent_id',
|
||||
'school_year',
|
||||
'correction_type',
|
||||
'approved_refundable_cents',
|
||||
'status',
|
||||
@@ -24,4 +28,14 @@ class PaymentCorrectionModel extends Model
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $validationRules = [
|
||||
'payment_id' => 'required|integer',
|
||||
'invoice_id' => 'required|integer',
|
||||
'parent_id' => 'required|integer',
|
||||
'school_year' => 'required|string|max_length[9]',
|
||||
'correction_type' => 'required|max_length[50]',
|
||||
'approved_refundable_cents' => 'required|integer|greater_than[0]',
|
||||
'status' => 'required|max_length[30]',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user