<?php

namespace App\Models;

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

class StructurePedagogique extends Model
{ 
    use HasFactory; 
    
    protected $fillable = ['id','niveau_id','nombre_section','nombre_eleves','nombre_filles','etablissement_id','annee_id'];
    
    public function niveau(): BelongsTo
    { 
        return $this->belongsTo(Niveau::class); 
    }

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