feat(SAM/API): Stock 모델에 Item 관계 추가 및 시더 생성
- Stock 모델에 item_id 필드 및 item() 관계 추가 - StockService에 item eager loading 적용 - stocks 테이블 item_id 마이그레이션 추가 - StockReceivingSeeder 더미 데이터 시더 생성 - Process 모델 Traits 경로 수정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ class Stock extends Model
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id',
|
||||
'item_id',
|
||||
'item_code',
|
||||
'item_name',
|
||||
'item_type',
|
||||
@@ -65,6 +66,14 @@ class Stock extends Model
|
||||
'out' => '없음',
|
||||
];
|
||||
|
||||
/**
|
||||
* 품목 관계
|
||||
*/
|
||||
public function item(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(\App\Models\Items\Item::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* LOT 관계
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user