53 lines
1.1 KiB
PHP
53 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class ClientModel extends Model
|
|
{
|
|
protected $table = 'clients';
|
|
protected $primaryKey = 'id';
|
|
protected $useAutoIncrement = true;
|
|
|
|
// Return as array (change to 'object' if you prefer objects)
|
|
protected $returnType = 'array';
|
|
|
|
protected $allowedFields = [
|
|
'client_type',
|
|
'entity_type_id',
|
|
'client_name',
|
|
'short_name',
|
|
'cost_center',
|
|
'client_code',
|
|
'pan',
|
|
'gst',
|
|
'address1',
|
|
'address2',
|
|
'city',
|
|
'state',
|
|
'pincode',
|
|
'is_download_btn',
|
|
'client_logo',
|
|
'created_by',
|
|
'created_at',
|
|
'updated_by',
|
|
'updated_at',
|
|
'is_active',
|
|
'common_mails',
|
|
'hr_mails',
|
|
'mail_domain',
|
|
'reply_to',
|
|
'dob',
|
|
'aadhar',
|
|
'reference',
|
|
'phone',
|
|
'email',
|
|
'addon_subheading',
|
|
'parent_client_id'
|
|
];
|
|
|
|
// Timestamp handling
|
|
protected $useTimestamps = false; // since DB handles created_at/updated_at defaults
|
|
}
|