Files
sam-api/app/Models/ProcessStep.php
권혁성 1f7f45ee60 feat: [process] 공정단계 options 컬럼 추가 — 검사 설정/범위 지원
- ProcessStep 모델에 options JSON 컬럼 추가 (fillable, cast)
- Store/UpdateProcessStepRequest에 inspection_setting, inspection_scope 검증 규칙
- process_steps 테이블 마이그레이션

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

45 lines
939 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ProcessStep extends Model
{
use HasFactory;
protected $fillable = [
'process_id',
'step_code',
'step_name',
'is_required',
'needs_approval',
'needs_inspection',
'is_active',
'sort_order',
'connection_type',
'connection_target',
'completion_type',
'options',
];
protected $casts = [
'is_required' => 'boolean',
'needs_approval' => 'boolean',
'needs_inspection' => 'boolean',
'is_active' => 'boolean',
'sort_order' => 'integer',
'options' => 'array',
];
/**
* 공정
*/
public function process(): BelongsTo
{
return $this->belongsTo(Process::class);
}
}