<?php

namespace App\Models;

use App\Models\Tarea;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class Material extends Model
{
    protected $guarded = [];

    public $timestamps = false;

    // Relación con Carrera
    public function carreraMaterial(): BelongsToMany
    {
        return $this->belongsToMany(Carrera::class);
    }

    // Tareas de esta materia
    public function tareas()
    {
        return $this->hasMany(Tarea::class);
    }
}
