<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class OpsiSubkriteria extends Model
{
    protected $table = 'opsisubkriterias'; 
    protected $fillable = [
        'subkriteria_id',
        'alternatif_id',
        'crips_id',
        'opsi',
    ];

    public function subkriteria()
    {
        return $this->belongsTo(Subkriteria::class);
    }
    
    public function crips()
    {
        return $this->belongsTo(Crip::class);
    }

    public function alternatif()
    {
        return $this->belongsTo(Alternatif::class);
    }

    public function detailSaw()
    {
    return $this->hasMany(DetailSaw::class);
    }

    
}
