<?php

namespace App\Models;

use CodeIgniter\Model;

class PtCoShareDetailsModel extends Model
{
    protected $table            = 'pt_co_share_details';
    protected $primaryKey       = 'id';

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

    protected $allowedFields    = [
        'pt_id',
        'insurer_id',
        'insurer_branch_id',
        'co_share_type',
        'co_share_per',
        'bp_amt',
        'bp_gst_amt',
        'bp_igst',
        'bp_sgst',
        'bp_cgst',
        'tp_amt',
        'tp_gst_amt',
        'tp_igst',
        'tp_sgst',
        'tp_cgst',
        'tep_amt',
        'tep_gst_amt',
        'tep_igst',
        'tep_sgst',
        'tep_cgst',
        'agreed_amt',
        'agreed_bp_per',
        'agreed_tp_per',
        'agreed_tep_per',
        'standerd_bp_per',
        'standerd_tp_per',
        'standerd_tep_per',
        'actual_bp_amt',
        'actual_tp_amt',
        'actual_tep_amt',
        'actual_bp_per',
        'actual_tp_per',
        'actual_tep_per',
        'actual_bp_brokerage_amt',
        'actual_tp_brokerage_amt',
        'actual_tep_brokerage_amt',
        'reward',
        'variance',
        'remark',
        'created_at',
        'created_by',
        'updated_at',
        'updated_by',
        'is_active',
        'cd_ac_no',
        'amount',
        'stamp_duty',
        'gst_type',
        'cop_amt',
        'cotp_amt',
        'cotep_amt',
        'exp_amt',
        'statement_id',
        'follower_policy_no',
        'non_comm_per_amt',
        'pt_policy_issue_date'
    ];

    // Auto timestamps
    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';

    // Validation rules (if needed later)
    protected $validationRules    = [];
    protected $validationMessages = [];
    protected $skipValidation     = true;
}
