<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class SeccionCurso extends Model
{
    protected $table = "seccion_curso";
    protected $dates = ['created_at'];
    protected $fillable = [
        'nombre_seccion',
        'id_curso',
        'id_profesor',
        'id_periodo',
        'id_turno'
    ];

    public function alumnos(){
        return $this->belongsToMany(Alumno::class, 'alumno_seccion', 'id_seccion_curso', 'id_alumno')
            ->withTimestamps();
    }
}
