<?php

namespace App\Models;

use CodeIgniter\Model;

class ClaimStatusModel extends Model
{
    protected $table            = 'ticket_claim_status';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;

    protected $returnType       = 'array'; // or 'object' if you prefer
    protected $useSoftDeletes   = false;

    protected $allowedFields    = [
        'ticket_type',
        'claim_status',
        'allowed_status',
        'trigger_type',
        'created_by',
        'updated_by',
        'is_active'
    ];

    // Timestamps (use created_at, updated_at from DB)
    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';
    protected $dateFormat    = 'datetime'; // works fine with timestamp

    // Validation rules (optional)
    protected $validationRules = [
        'claim_status' => 'required|max_length[40]',
        'allowed_status' => 'max_length[250]',
        'is_active' => 'in_list[0,1]'
    ];

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