- 동적 필드/연결 모델 추가 (SectionField, Link, LinkValue, Preset) - 통합 검색 API (SourceTableSearchController) - items/processes/lots/users - 템플릿 편집 UI: 소스 테이블 드롭다운 + datalist 검색/선택 - 문서 작성/인쇄/상세 뷰: getFieldValue() 기반 동적 렌더링 - DocumentTemplateApiController: source_table 기반 저장/복제 - DocumentController: sectionFields/links eager loading 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
729 B
PHP
36 lines
729 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class DocumentTemplateLinkValue extends Model
|
|
{
|
|
protected $table = 'document_template_link_values';
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'template_id',
|
|
'link_id',
|
|
'linkable_id',
|
|
'sort_order',
|
|
'created_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'sort_order' => 'integer',
|
|
];
|
|
|
|
public function template(): BelongsTo
|
|
{
|
|
return $this->belongsTo(DocumentTemplate::class, 'template_id');
|
|
}
|
|
|
|
public function link(): BelongsTo
|
|
{
|
|
return $this->belongsTo(DocumentTemplateLink::class, 'link_id');
|
|
}
|
|
}
|