<?php

namespace App\Models;

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

class CostInput extends Model
{
    use HasFactory;

    protected $table = 'cost_inputs';
    protected $fillable = [
        'cantidad',
        'precio_compra',
        'precio_venta',
        'active',
        'id_input',
        'id_unit',
    ];

    public function input()
    {
        return $this->belongsTo(Input::class, 'id_input');
    }
    public function unit()
    {
        return $this->belongsTo(Unit::class, 'id_unit');
    }
}
