<?php

namespace App\Models;

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

class CostSalesGuide extends Model
{
    use HasFactory;

    protected $table = 'cost_sales_guide';

        protected $fillable = [
        'cantidad',
        'id_input',
        'id_unit',
        'equivale',
        'unit_name',
        'precio_venta',
        'total',
        'id_sales_guide',
        'cantidad_presentacion',
    ];

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