feat:개소별 자재 투입 관리 API 추가
- work_order_material_inputs 테이블 신규 생성 (개소별 자재 투입 추적) - 개소별 자재 조회/투입/이력/삭제/수정 API 5개 추가 - StockService.increaseToLot: LOT 수량 복원 메서드 추가 - WorkOrderService에 개소별 자재 투입 비즈니스 로직 구현 - WorkOrder, WorkOrderItem 모델에 materialInputs 관계 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
use App\Traits\BelongsToTenant;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
/**
|
||||
* 작업지시 품목 모델
|
||||
@@ -81,6 +82,14 @@ public function sourceOrderItem(): BelongsTo
|
||||
return $this->belongsTo(OrderItem::class, 'source_order_item_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 자재 투입 이력
|
||||
*/
|
||||
public function materialInputs(): HasMany
|
||||
{
|
||||
return $this->hasMany(WorkOrderMaterialInput::class);
|
||||
}
|
||||
|
||||
// ──────────────────────────────────────────────────────────────
|
||||
// 스코프
|
||||
// ──────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user