<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class Rule extends Model
{
    use HasFactory;
    protected $primaryKey = 'id';
    protected $fillable = [
        'penyakitId',
        'gejalaId',
        'nilaiPakar',
        'belief',
    ];

    public function penyakit()
    {
        return $this->belongsTo(Penyakit::class, 'penyakitId');
    }

    public function gejala()
    {
        return $this->belongsTo(Gejala::class, 'gejalaId');
    }
}
