fix : 주문 테이블 모델링 -> 추후 변경예정 (견적, 수주, 발주에 대한 각각의 컬럼을 위한 테이블 필요)
This commit is contained in:
24
app/Models/Orders/OrderItemComponent.php
Normal file
24
app/Models/Orders/OrderItemComponent.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Orders;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class OrderItemComponent extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
// 투입구성(자재, 제품, 부품, BOM)
|
||||
protected $table = 'order_item_components';
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id', 'order_item_id', 'component_type', 'component_id', 'quantity',
|
||||
'unit', 'price', 'remarks', 'created_by', 'updated_by'
|
||||
];
|
||||
|
||||
public function orderItem()
|
||||
{
|
||||
return $this->belongsTo(OrderItem::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user