Files
sam-manage/app/Models/Items/ItemDetail.php
권혁성 f271f8bdc3 feat:품목관리 3-Panel 페이지 신규 구현 + FormulaEvaluatorService 연동
- 품목관리 3-Panel 레이아웃 (좌:목록, 중:BOM/수식산출, 우:상세)
- FormulaApiService로 API 견적수식 엔진 연동
- FG 품목 선택 시 기본값(W:1000, H:1000, QTY:1) 자동 산출
- 수식 산출 결과 트리 렌더링 (그룹별/소계/합계)
- 중앙 패널 클릭 시 우측 상세만 변경 (skipCenterUpdate)
- API 인증 버튼 전역 헤더로 이동 (모든 페이지에서 사용 가능)
- FormulaApiService에 Bearer 토큰 지원 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:50:24 +09:00

40 lines
1.1 KiB
PHP

<?php
namespace App\Models\Items;
use Illuminate\Database\Eloquent\Model;
class ItemDetail extends Model
{
protected $table = 'item_details';
protected $fillable = [
'item_id',
// Products 전용
'is_sellable', 'is_purchasable', 'is_producible',
'safety_stock', 'lead_time', 'is_variable_size',
'product_category', 'part_type',
'bending_diagram', 'bending_details',
'specification_file', 'specification_file_name',
'certification_file', 'certification_file_name',
'certification_number', 'certification_start_date', 'certification_end_date',
// Materials 전용
'is_inspection', 'item_name', 'specification', 'search_tag', 'remarks',
];
protected $casts = [
'is_sellable' => 'boolean',
'is_purchasable' => 'boolean',
'is_producible' => 'boolean',
'is_variable_size' => 'boolean',
'bending_details' => 'array',
'certification_start_date' => 'date',
'certification_end_date' => 'date',
];
public function item()
{
return $this->belongsTo(Item::class);
}
}