<?php

namespace App\Models;

use CodeIgniter\Model;

class InvoiceUtrModel extends Model
{
    protected $table            = 'partner_invoice_utr';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;

    protected $returnType       = 'array';
    protected $useSoftDeletes   = false;

    protected $allowedFields    = [
        'invoice_id',
        'utr_no',
        'utr_date',
        'amount',
        'is_active',
        'created_at',
        'created_by',
        'updated_at',
        'updated_by'
    ];

    protected $useTimestamps = false;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';

    protected $validationRules = [
        'invoice_id' => 'required|integer',
        'utr_no'     => 'required|max_length[100]',
        'amount'     => 'decimal'
    ];

    protected $validationMessages = [];
    protected $skipValidation     = false;
}
