feat: 공정 단계(ProcessStep) CRUD API 구현
- process_steps 테이블 마이그레이션 생성 (step_code, sort_order, boolean 플래그 등)
- ProcessStep 모델 생성 (child entity 패턴, HasFactory만 사용)
- ProcessStepService: CRUD + reorder + STP-001 자동채번
- ProcessStepController: DI + ApiResponse::handle 패턴
- FormRequest 3개: Store, Update, Reorder
- Process 모델에 steps() HasMany 관계 추가
- ProcessService eager-load에 steps 추가 (5곳)
- Nested routes: /processes/{processId}/steps
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,14 @@ public function items(): BelongsToMany
|
||||
->orderByPivot('priority');
|
||||
}
|
||||
|
||||
/**
|
||||
* 공정 단계
|
||||
*/
|
||||
public function steps(): HasMany
|
||||
{
|
||||
return $this->hasMany(ProcessStep::class)->orderBy('sort_order');
|
||||
}
|
||||
|
||||
/**
|
||||
* 작업지시들
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user