<?php

namespace App\Models;

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

class PersonnelEncadrement extends Model
{
    use HasFactory;

    protected $fillable = ['type_encadrement_id', 'etablissement_id', 'nombre_personnel_encadrement', 'annee_id'];

    public function typeEncadrement(): BelongsTo
    {
        return $this->belongsTo(TypeEncadrement::class);
    }

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

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