AMS_Backend/app/Models/SupplierDetails.php
2025-11-06 13:41:06 +08:00

71 lines
1.7 KiB
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class SupplierDetails extends Model
{
protected $table = 'supplier_details';
protected $primaryKey = 'supplier_id';
protected $allowedFields = [
'supplier_name',
'supplier_ssm_no',
'supplier_TIN_no',
'supplier_phone_no',
'supplier_email',
'supplier_address_1',
'supplier_address_2',
'supplier_address_3',
'supplier_address_4',
'poscode',
'town',
'state',
'country',
'person_in_charge',
'pic_phone_no',
'accounting_no',
'created_at',
'updated_at',
'deleted_at'
];
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $protectFields = true;
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected array $casts = [];
protected array $castHandlers = [];
// Dates
protected $useTimestamps = false;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}