<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ProductionOrder extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'plant_id',
        'item_id',
        'quantity',
        'start_date',
        'end_date',
        'production_order',
        'from_serial_number',
        'to_serial_number',
        'created_at',
        'created_by',
        'updated_at',
        'updated_by',
    ];

    public function plant()
    {
        return $this->belongsTo(Plant::class);
    }

    public function item()
    {
        return $this->belongsTo(Item::class);
    }
}
