37 lines
949 B
PHP
37 lines
949 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class BagStockDetailsModel extends Model
|
|
{
|
|
protected $table = 't_bagStockDetails';
|
|
protected $returnType = 'array';
|
|
protected $useSoftDeletes = false;
|
|
protected $protectFields = true;
|
|
protected $allowedFields = [
|
|
'date', 'materialCode', 'customer', 'opening', 'receipt', 'used', 'balanceStock'
|
|
];
|
|
|
|
protected bool $allowEmptyInserts = false;
|
|
protected bool $updateOnlyChanged = true;
|
|
|
|
// Dates
|
|
protected $useTimestamps = false;
|
|
protected $dateFormat = 'datetime';
|
|
|
|
// Validation
|
|
protected $validationRules = [];
|
|
protected $validationMessages = [];
|
|
protected $skipValidation = false;
|
|
protected $cleanValidationRules = true;
|
|
|
|
/**
|
|
* Custom method to handle composite key updates.
|
|
* @param array $data Array of records to be updated in bulk.
|
|
* @return bool
|
|
*/
|
|
|
|
}
|