<?php

namespace App\Models;

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

class CaraEstacion extends Model
{
    use HasFactory;

    protected $table = 'caras_estacion';
    protected $primaryKey = 'id_cara';
    public $timestamps = false;

    protected $fillable = [
        'id_estacion',
        'nombre',
        'estado',
    ];

    public function estacion()
    {
        return $this->belongsTo(Estacion::class, 'id_estacion', 'id_estacion');
    }

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