Files
sam-manage/app/Models/DocumentTemplateSection.php
권혁성 3e1d1ffc33 feat: [문서인쇄] 스냅샷 출력 + 절곡 전용 렌더링
- print.blade.php rendered_html 스냅샷 우선 출력
- bending-inspection-data, bending-worklog 파셜 추가
- documents/show.blade.php 개선
- DocumentTemplateSection 모델 보완

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

37 lines
806 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class DocumentTemplateSection extends Model
{
use HasFactory;
protected $fillable = [
'template_id',
'title',
'description',
'image_path',
'sort_order',
];
protected $casts = [
'sort_order' => 'integer',
];
public function template(): BelongsTo
{
return $this->belongsTo(DocumentTemplate::class, 'template_id');
}
public function items(): HasMany
{
return $this->hasMany(DocumentTemplateSectionItem::class, 'section_id')
->orderBy('sort_order');
}
}