Files
sam-manage/app/Models/DocumentTemplateBasicField.php
권혁성 1eb294f2e7 fix:문서 템플릿 기본필드 field_key $fillable 누락 수정
- DocumentTemplateBasicField 모델의 $fillable에 field_key 추가
- Mass Assignment 보호로 인해 create() 시 field_key가 null로 저장되던 버그 수정
- 검사성적서 기본정보 매핑 정상화

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:06:59 +09:00

30 lines
612 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class DocumentTemplateBasicField extends Model
{
use HasFactory;
protected $fillable = [
'template_id',
'label',
'field_key',
'field_type',
'default_value',
'sort_order',
];
protected $casts = [
'sort_order' => 'integer',
];
public function template(): BelongsTo
{
return $this->belongsTo(DocumentTemplate::class, 'template_id');
}
}