<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Prerrequisito extends Model
{
    protected $table = "ins_prerrequisito";
    protected $primaryKey = 'cve_pre';
    protected $fillable = ['cve_mat'];

    public function materia()
    {
        return $this->hasOne('App\Materia', 'cve_mat', 'cve_mat');
    }

    public function DetalleMatP()
    {
        return $this->hasMany('App\DetalleMateriaPrerrequisito','cve_pre','cve_pre');
    }
}
