40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class ManagerIncentiveFileModel extends Model
|
|
{
|
|
protected $table = 'partner_manager_incentive_file';
|
|
protected $primaryKey = 'id';
|
|
protected $returnType = 'array';
|
|
protected $useSoftDeletes = false;
|
|
|
|
protected $allowedFields = [
|
|
'manager_id',
|
|
'incentive_month',
|
|
'incentive_file_name',
|
|
'is_active',
|
|
'created_by',
|
|
'created_on',
|
|
'updated_by',
|
|
'updated_on',
|
|
];
|
|
|
|
// Auto Timestamps
|
|
protected $useTimestamps = true;
|
|
protected $createdField = 'created_on';
|
|
protected $updatedField = 'updated_on';
|
|
protected $deletedField = '';
|
|
|
|
// Validation Rules (you can add more later if needed)
|
|
protected $validationRules = [
|
|
'manager_id' => 'required|integer',
|
|
'incentive_month' => 'required|valid_date',
|
|
'incentive_file_name'=> 'required|string|max_length[150]',
|
|
];
|
|
protected $validationMessages = [];
|
|
protected $skipValidation = false;
|
|
}
|