- DocumentTemplateBasicField 모델의 $fillable에 field_key 추가 - Mass Assignment 보호로 인해 create() 시 field_key가 null로 저장되던 버그 수정 - 검사성적서 기본정보 매핑 정상화 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
612 B
PHP
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');
|
|
}
|
|
} |