<?php

namespace App\Models;

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

class ProductionPlan extends Model
{
    use SoftDeletes;

    protected $fillable = [
        "plant_id",
        "item_id",
        "shift_id",
        "created_at",
        "line_id",
        "plan_quantity",
        "production_quantity",
        "operator_id",
        "working_days",
        "leave_dates",
    ];

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

    public function shift(): BelongsTo
    {
        return $this->belongsTo(Shift::class);
    }

    public function line(): BelongsTo
    {
        return $this->belongsTo(Line::class);
    }

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