Files
sam-manage/app/Models/ESign/EsignAuditLog.php
김보곤 376e1bf57e fix:EsignAuditLog 생성 시 tenant_id 누락 수정
모델 $fillable에 tenant_id 추가, 컨트롤러의 감사 로그 생성 3곳
(contract_created, contract_cancelled, sign_request_sent) 모두
tenant_id를 포함하도록 수정.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:56:41 +09:00

40 lines
794 B
PHP

<?php
namespace App\Models\ESign;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class EsignAuditLog extends Model
{
protected $table = 'esign_audit_logs';
public $timestamps = false;
protected $fillable = [
'tenant_id',
'contract_id',
'signer_id',
'action',
'ip_address',
'user_agent',
'metadata',
'created_at',
];
protected $casts = [
'metadata' => 'array',
'created_at' => 'datetime',
];
public function contract(): BelongsTo
{
return $this->belongsTo(EsignContract::class, 'contract_id');
}
public function signer(): BelongsTo
{
return $this->belongsTo(EsignSigner::class, 'signer_id');
}
}