Files
sam-api/app/Models/ESign/EsignAuditLog.php
김보곤 6958be1fd8 feat:E-Sign 전자계약 서명 솔루션 백엔드 구현
- 마이그레이션 4개 (esign_contracts, esign_signers, esign_sign_fields, esign_audit_logs)
- 모델 4개 (EsignContract, EsignSigner, EsignSignField, EsignAuditLog)
- 서비스 4개 (EsignContractService, EsignSignService, EsignPdfService, EsignAuditService)
- 컨트롤러 2개 (EsignContractController, EsignSignController)
- FormRequest 4개 (ContractStore, FieldConfigure, SignSubmit, SignReject)
- Mail 1개 (EsignRequestMail + 이메일 템플릿)
- API 라우트 (인증 계약 관리 + 토큰 기반 서명 프로세스)

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

58 lines
1.4 KiB
PHP

<?php
namespace App\Models\ESign;
use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class EsignAuditLog extends Model
{
use BelongsToTenant;
protected $table = 'esign_audit_logs';
public $timestamps = false;
// 액션 상수
public const ACTION_CREATED = 'created';
public const ACTION_SENT = 'sent';
public const ACTION_VIEWED = 'viewed';
public const ACTION_OTP_SENT = 'otp_sent';
public const ACTION_AUTHENTICATED = 'authenticated';
public const ACTION_SIGNED = 'signed';
public const ACTION_REJECTED = 'rejected';
public const ACTION_COMPLETED = 'completed';
public const ACTION_CANCELLED = 'cancelled';
public const ACTION_REMINDED = 'reminded';
public const ACTION_DOWNLOADED = 'downloaded';
protected $fillable = [
'tenant_id',
'contract_id',
'signer_id',
'action',
'ip_address',
'user_agent',
'metadata',
'created_at',
];
protected $casts = [
'metadata' => 'array',
'created_at' => 'datetime',
];
// === Relations ===
public function contract(): BelongsTo
{
return $this->belongsTo(EsignContract::class, 'contract_id');
}
public function signer(): BelongsTo
{
return $this->belongsTo(EsignSigner::class, 'signer_id');
}
}