워커 수정
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,10 @@ class ReceiptModel extends Model
|
||||
protected $allowedFields = [
|
||||
'comp_sq', 'rcpt_rating', 'rcpt_key', 'rcpt_atclno', 'rcpt_type',
|
||||
'rcpt_product', 'rcpt_product_nm', 'rcpt_product_info1', 'rcpt_product_info2',
|
||||
'rcpt_product_info3', 'rcpt_office', 'rcpt_agent', 'rcpt_sido', 'rcpt_hscp_nm',
|
||||
'rcpt_product_info3', 'rcpt_product_info4', 'rcpt_product_info5', 'rcpt_product_info6',
|
||||
'trade_type', 'rcpt_ptp_no', 'rcpt_hscp_no',
|
||||
'dealAmount', 'warrantyAmount', 'leaseAmount', 'preSaleAmount', 'premiumAmount', 'preSaleOptionAmount',
|
||||
'rcpt_office', 'rcpt_agent', 'rcpt_sido', 'rcpt_hscp_nm',
|
||||
'rcpt_dtl_addr', 'rcpt_etc_addr', 'rcpt_floor', 'rcpt_floor2', 'rcpt_tm',
|
||||
'rcpt_stat', 'rcpt_x', 'rcpt_y', 'agent_nm', 'agent_head_tel', 'rsrv_date',
|
||||
'insert_tm', 'rcpt_cpid', 'room_cnt', 'isSiteVRVerification'
|
||||
@@ -104,4 +107,5 @@ class ReceiptModel extends Model
|
||||
'total' => $totalCount
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user