<?php

namespace App\Models\Educacion;

use App\Models\PivoteAreaCursoDocente;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Area extends Model
{
    use HasFactory;

    protected $fillable = ['nombre'];

    public function carreras()
    {
        return $this->hasMany(Carrera::class, 'id_area');
    }    

    public function pivote_areas_cursos_docentes()
    {
        return $this->hasMany(PivoteAreaCursoDocente::class, 'id_area');
    }

}
