- 검사주기 입력을 n값, c값, 텍스트 3개로 분리 - standard_criteria JSON으로 구조화된 비교기준 저장 (min/max + 이상/초과/이하/미만) - 미리보기 측정치 셀 수를 frequency_n 기반 동적 렌더링 - 그룹 항목 미리보기에서 측정치/검사방식/주기/판정 행별 개별 표시 - ID 비교 === → == 수정 (문자열/숫자 타입 불일치 버그) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
40 lines
885 B
PHP
40 lines
885 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class DocumentTemplateSectionItem extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'section_id',
|
|
'category',
|
|
'item',
|
|
'standard',
|
|
'tolerance',
|
|
'standard_criteria',
|
|
'method',
|
|
'measurement_type',
|
|
'frequency_n',
|
|
'frequency_c',
|
|
'frequency',
|
|
'regulation',
|
|
'sort_order',
|
|
];
|
|
|
|
protected $casts = [
|
|
'standard_criteria' => 'array',
|
|
'sort_order' => 'integer',
|
|
'frequency_n' => 'integer',
|
|
'frequency_c' => 'integer',
|
|
];
|
|
|
|
public function section(): BelongsTo
|
|
{
|
|
return $this->belongsTo(DocumentTemplateSection::class, 'section_id');
|
|
}
|
|
} |