<?php

namespace App\Models;

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

class Tanque extends Model
{
    use HasFactory;

    protected $table = 'tanques';
    protected $primaryKey = 'id_tanque';
    public $timestamps = false;

    protected $fillable = [
        'id_tipo_combustible',
        'nombre',
        'capacidad',
        'stock_actual',
    ];

    public function tipoCombustible()
    {
        return $this->belongsTo(TipoCombustible::class, 'id_tipo_combustible', 'id_tipo_combustible');
    }
}
