<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class MaterialForecast extends Model
{
    protected $fillable = [
        'product_id',
        'current_stock',
        'daily_consumption_avg',
        'predicted_shortage_at',
        'recommended_purchase_quantity',
    ];

    protected $casts = [
        'predicted_shortage_at' => 'datetime',
    ];

    public function product()
    {
        return $this->belongsTo(Product::class);
    }
}
