<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Alternatif extends Model
{
    protected $fillable = [
        'nama',
    ];


    public function mapels()
    {
        return $this->belongsToMany(Mapel::class, 'alternatif_mapel');
    }
    
    public function kurikulum()
    {
    return $this->belongsTo(Kurikulum::class, 'kurikulum_id');
    }

    public function opsisubkriterias()
    {
        return $this->hasMany(OpsiSubkriteria::class);
    }

    public function hasilsaw()
    {
    return $this->hasMany(HasilSaw::class);
    }

}
