refactor:E-Sign 외부 API 호출을 MNG 내부 라우트로 전환
- Finance 패턴과 동일하게 MNG 직접 DB 접근 방식으로 변경
- MNG 모델 4개 추가: EsignContract, EsignSigner, EsignSignField, EsignAuditLog
- EsignApiController 추가: stats, index, show, store, cancel, configureFields, send, download
- 모든 뷰(dashboard, create, detail, fields, send)에서 외부 API URL 제거
- 기존 X-API-Key/Bearer 인증 대신 MNG 세션 인증(CSRF) 사용
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 10:24:09 +09:00
|
|
|
<?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 = [
|
2026-02-12 15:56:41 +09:00
|
|
|
'tenant_id',
|
refactor:E-Sign 외부 API 호출을 MNG 내부 라우트로 전환
- Finance 패턴과 동일하게 MNG 직접 DB 접근 방식으로 변경
- MNG 모델 4개 추가: EsignContract, EsignSigner, EsignSignField, EsignAuditLog
- EsignApiController 추가: stats, index, show, store, cancel, configureFields, send, download
- 모든 뷰(dashboard, create, detail, fields, send)에서 외부 API URL 제거
- 기존 X-API-Key/Bearer 인증 대신 MNG 세션 인증(CSRF) 사용
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 10:24:09 +09:00
|
|
|
'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');
|
|
|
|
|
}
|
|
|
|
|
}
|