<?php

namespace App\Models;

use CodeIgniter\Model;

class PaymentErrorModel extends Model
{
    protected $table = 'payment_error';      // The DB table
    protected $primaryKey = 'id';            // Primary key

    protected $allowedFields = [
        'payment_id',
        'invoice_id',
        'parent_id',
        'wrong_paid_amount',
        'wrong_payment_method',
        'wrong_check_file',
        'error_note',
        'semester',
        'school_year',
        'logged_at',
        'logged_by'
    ];

    protected $useTimestamps = false;        // We'll manage logged_at manually
    protected $validationRules = [
    'wrong_paid_amount' => 'required|decimal',
    'payment_id' => 'required|integer',
    'invoice_id' => 'required|integer',
    'parent_id' => 'required|integer'
];

}
