nhance/app/Models/InvoiceItemModel.php
2025-11-15 09:34:35 +05:30

42 lines
1022 B
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class InvoiceItemModel extends Model
{
protected $table = 'partner_invoice_items';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $allowedFields = [
'invoice_id',
'policy_id',
'policy_no',
'commission_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',
'policy_id' => 'required|integer',
'policy_no' => 'required|max_length[100]',
'commission_amount' => 'decimal'
];
protected $validationMessages = [];
protected $skipValidation = false;
}