<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Alternatif extends Model
{
    protected $table = 'data_alternatifs';
    protected $fillable = [
        'nama_lahan',
        'user_id',
    ];

    public function penilaians()
    {
        return $this->hasMany(Penilaian::class, 'alternatif_id');
    }

    public function historisPerhitungans()
    {
        return $this->hasMany(HistorisPerhitungan::class, 'alternatif_id');
    }
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}


