fix : 주문 테이블 모델링 -> 추후 변경예정 (견적, 수주, 발주에 대한 각각의 컬럼을 위한 테이블 필요)

This commit is contained in:
2025-07-29 23:22:31 +09:00
parent 511c09fd19
commit 2a0f3471a8
5 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models\Orders;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class OrderItem extends Model
{
use SoftDeletes;
// 주문 상세
protected $table = 'order_items';
protected $fillable = [
'tenant_id', 'order_id', 'serial_no', 'product_id', 'quantity',
'status_code', 'design_code', 'remarks', 'attributes'
];
// 투입 구성(자재/BOM 등)
public function components()
{
return $this->hasMany(OrderItemComponent::class);
}
public function order()
{
return $this->belongsTo(Order::class);
}
}