feat(API): 공정 options JSON 컬럼 마이그레이션
- needs_work_log 개별 컬럼 → options JSON 구조로 전환 - StoreProcessRequest, UpdateProcessRequest 유효성 규칙 갱신 - Process 모델 $fillable, $casts 갱신 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,8 +20,10 @@ public function rules(): array
|
||||
'department' => ['nullable', 'string', 'max:100'],
|
||||
'work_log_template' => ['nullable', 'string', 'max:100'],
|
||||
'document_template_id' => ['nullable', 'integer', 'exists:document_templates,id'],
|
||||
'needs_work_log' => ['nullable', 'boolean'],
|
||||
'work_log_template_id' => ['nullable', 'integer', 'exists:document_templates,id'],
|
||||
'options' => ['nullable', 'array'],
|
||||
'options.needs_inspection' => ['nullable', 'boolean'],
|
||||
'options.needs_work_log' => ['nullable', 'boolean'],
|
||||
'required_workers' => ['nullable', 'integer', 'min:1'],
|
||||
'equipment_info' => ['nullable', 'string', 'max:255'],
|
||||
'work_steps' => ['nullable'],
|
||||
@@ -52,8 +54,10 @@ public function attributes(): array
|
||||
'department' => '담당부서',
|
||||
'work_log_template' => '작업일지 양식',
|
||||
'document_template_id' => '중간검사 양식',
|
||||
'needs_work_log' => '작업일지 여부',
|
||||
'work_log_template_id' => '작업일지 양식 ID',
|
||||
'options' => '공정 설정',
|
||||
'options.needs_inspection' => '중간검사 여부',
|
||||
'options.needs_work_log' => '작업일지 여부',
|
||||
'required_workers' => '필요인원',
|
||||
'equipment_info' => '설비정보',
|
||||
'work_steps' => '작업단계',
|
||||
|
||||
@@ -20,8 +20,10 @@ public function rules(): array
|
||||
'department' => ['nullable', 'string', 'max:100'],
|
||||
'work_log_template' => ['nullable', 'string', 'max:100'],
|
||||
'document_template_id' => ['nullable', 'integer', 'exists:document_templates,id'],
|
||||
'needs_work_log' => ['nullable', 'boolean'],
|
||||
'work_log_template_id' => ['nullable', 'integer', 'exists:document_templates,id'],
|
||||
'options' => ['nullable', 'array'],
|
||||
'options.needs_inspection' => ['nullable', 'boolean'],
|
||||
'options.needs_work_log' => ['nullable', 'boolean'],
|
||||
'required_workers' => ['nullable', 'integer', 'min:1'],
|
||||
'equipment_info' => ['nullable', 'string', 'max:255'],
|
||||
'work_steps' => ['nullable'],
|
||||
@@ -52,8 +54,10 @@ public function attributes(): array
|
||||
'department' => '담당부서',
|
||||
'work_log_template' => '작업일지 양식',
|
||||
'document_template_id' => '중간검사 양식',
|
||||
'needs_work_log' => '작업일지 여부',
|
||||
'work_log_template_id' => '작업일지 양식 ID',
|
||||
'options' => '공정 설정',
|
||||
'options.needs_inspection' => '중간검사 여부',
|
||||
'options.needs_work_log' => '작업일지 여부',
|
||||
'required_workers' => '필요인원',
|
||||
'equipment_info' => '설비정보',
|
||||
'work_steps' => '작업단계',
|
||||
|
||||
@@ -28,8 +28,8 @@ class Process extends Model
|
||||
'department',
|
||||
'work_log_template',
|
||||
'document_template_id',
|
||||
'needs_work_log',
|
||||
'work_log_template_id',
|
||||
'options',
|
||||
'required_workers',
|
||||
'equipment_info',
|
||||
'work_steps',
|
||||
@@ -43,7 +43,7 @@ class Process extends Model
|
||||
protected $casts = [
|
||||
'work_steps' => 'array',
|
||||
'is_active' => 'boolean',
|
||||
'needs_work_log' => 'boolean',
|
||||
'options' => 'array',
|
||||
'required_workers' => 'integer',
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user