- EsignFieldTemplate, EsignFieldTemplateItem 모델 추가 - EsignApiController에 템플릿 CRUD + 적용/복사 메서드 5개 추가 - web.php에 템플릿 라우트 5개 추가 - fields.blade.php에 템플릿 드롭다운 메뉴 + 모달 3개 추가 (SaveTemplate, LoadTemplate, CopyFromContract) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
952 B
PHP
42 lines
952 B
PHP
<?php
|
|
|
|
namespace App\Models\ESign;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class EsignFieldTemplateItem extends Model
|
|
{
|
|
protected $table = 'esign_field_template_items';
|
|
|
|
protected $fillable = [
|
|
'template_id',
|
|
'signer_order',
|
|
'page_number',
|
|
'position_x',
|
|
'position_y',
|
|
'width',
|
|
'height',
|
|
'field_type',
|
|
'field_label',
|
|
'is_required',
|
|
'sort_order',
|
|
];
|
|
|
|
protected $casts = [
|
|
'signer_order' => 'integer',
|
|
'page_number' => 'integer',
|
|
'position_x' => 'decimal:2',
|
|
'position_y' => 'decimal:2',
|
|
'width' => 'decimal:2',
|
|
'height' => 'decimal:2',
|
|
'is_required' => 'boolean',
|
|
'sort_order' => 'integer',
|
|
];
|
|
|
|
public function template(): BelongsTo
|
|
{
|
|
return $this->belongsTo(EsignFieldTemplate::class, 'template_id');
|
|
}
|
|
}
|