<?php

namespace App\Models;

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

class PersonnelEnseignant extends Model
{
    use HasFactory;

    protected $fillable = ['charge_id', 'etablissement_id', 'discipline_id', 'nombre_profs', 'annee_id'];

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

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

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

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