<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Estudiante extends Model
{
    protected $table = 'estudiantes';

    protected $fillable = [
        'first_name',
        'last_name',
        'student_id',
        'date_of_birth',
    ];

    public function grados(): HasMany
    {
        return $this->hasMany(Grado::class, 'estudiante_id');
    }
}
