워커 수정
This commit is contained in:
47
app/Models/Entities/ChangedHistoryModel.php
Normal file
47
app/Models/Entities/ChangedHistoryModel.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Entities;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class ChangedHistoryModel extends Model
|
||||
{
|
||||
protected $table = 'changed_history';
|
||||
protected $primaryKey = 'seq';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = 'array';
|
||||
protected $protectFields = true;
|
||||
|
||||
protected $allowedFields = [
|
||||
'rcpt_sq',
|
||||
'rcpt_stat',
|
||||
'changed_type',
|
||||
'changed_id',
|
||||
'changed_tm',
|
||||
'remark',
|
||||
];
|
||||
|
||||
/**
|
||||
* 정보변경 이력 1건 저장
|
||||
*/
|
||||
public function addHistory(
|
||||
int $rcptSq,
|
||||
?string $rcptStat,
|
||||
?string $changedType,
|
||||
?string $changedId,
|
||||
?string $remark,
|
||||
?string $changedTm = null
|
||||
): bool {
|
||||
$data = [
|
||||
'rcpt_sq' => $rcptSq,
|
||||
'rcpt_stat' => $rcptStat,
|
||||
'changed_type' => $changedType,
|
||||
'changed_id' => $changedId,
|
||||
'changed_tm' => $changedTm ?? date('Y-m-d H:i:s'),
|
||||
'remark' => $remark,
|
||||
];
|
||||
|
||||
return $this->insert($data) !== false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user