<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Grade extends Model
{
    protected $fillable = ['name', 'level', 'description'];

    public function subjects()
    {
        return $this->belongsToMany(Subject::class, 'grade_subject');
    }

    public function studentProfiles()
    {
        return $this->hasMany(StudentProfile::class);
    }

    public function timetableEntries()
    {
        return $this->hasMany(TimetableEntry::class);
    }
}
