<?php

namespace App\Models;

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

class TipoCombustible extends Model
{
    use HasFactory;

    protected $table = 'tipos_combustible';
    protected $primaryKey = 'id_tipo_combustible';
    public $timestamps = false;

    protected $fillable = [
        'nombre',
        'octanaje',
        'precio',
        'estado',
    ];

    public function mangueras()
    {
        return $this->hasMany(Manguera::class, 'id_tipo_combustible', 'id_tipo_combustible');
    }

    public function tanques()
    {
        return $this->hasMany(Tanque::class, 'id_tipo_combustible', 'id_tipo_combustible');
    }
}
