<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class MateriaPrerrequisito extends Model
{
    protected $table = "matPre";
    protected $primaryKey = 'cve_matpre';
    protected $fillable = ['cve_detmat', 'cve_pre'];

    public function detallemat()
    {
        return $this->belongsTo('App\Detallemat', 'cve_detmat', 'cve_detmat');
    }

    public function prerrequisito()
    {
        return $this->belongsTo('App\Prerrequisito', 'cve_pre', 'cve_pre');
    }
}
