<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class PerbandinganKriteria extends Model
{
    use HasFactory;
    public $timestamps = false;
    protected $fillable = ['kriteria_id_1', 'kriteria_id_2', 'nilai'];

    public function kriteria1()
    {
        return $this->belongsTo(Kriteria::class, 'kriteria_id_1');
    }

    public function kriteria2()
    {
        return $this->belongsTo(Kriteria::class, 'kriteria_id_2');
    }
}
