<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class AlmacenInsumo extends Model
{
    use HasFactory;

    protected $table = 'almacenes_insumos';
    protected $fillable = ['almacen_insumo_id', 'insumo_id', 'stock', 'remito', 'fecha_remito', 'orden'];

    public function insumo() 
    {
        return $this->belongsTo(Insumo::class, 'insumo_id');
    }

    public function almacen() 
    {
        return $this->belongsTo(Almacen::class, 'almacen_id');
    }
}
