Files
alrahma_sunday_school/app/Models/PaymentCorrectionModel.php
T
root 2be16553df
Tests / PHPUnit (push) Successful in 1m21s
fix test run issue
2026-07-18 23:18:49 -04:00

42 lines
1.0 KiB
PHP

<?php
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';
protected $useTimestamps = false;
protected $allowedFields = [
'payment_id',
'invoice_id',
'parent_id',
'school_year',
'correction_type',
'approved_refundable_cents',
'status',
'reason',
'approved_by',
'approved_at',
'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]',
];
}