<?php

namespace App\Models;

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

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Infrastructure extends Model
{
    //

       

    use HasFactory;
    protected $fillable = ['type_infrastructure_id', 'nombre_movais','nombre_moyens','annee_id','etablissement_id'];

    public function typeInfrastructure(): BelongsTo
{ 
        return $this->belongsTo(TypeInfrastructure::class); 
}
public function annee(): BelongsTo
{ 
    return $this->belongsTo(Annee::class); 
}
public function etablissement(): BelongsTo
{ 
    return $this->belongsTo(Etablissement::class); 
}
}
