2026-01-26 10:37:47 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Modules\Production\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2026-01-27 08:59:45 +08:00
|
|
|
|
2026-01-26 10:37:47 +08:00
|
|
|
|
|
|
|
|
class ProductionOrderItem extends Model
|
|
|
|
|
{
|
|
|
|
|
/** @use HasFactory<\Database\Factories\ProductionOrderItemFactory> */
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'production_order_id',
|
|
|
|
|
'inventory_id',
|
|
|
|
|
'quantity_used',
|
|
|
|
|
'unit_id',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'quantity_used' => 'decimal:4',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function productionOrder(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(ProductionOrder::class);
|
|
|
|
|
}
|
|
|
|
|
}
|