<?php

namespace App\Models;

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

class SubCriteria extends Model
{
    protected $fillable = ['criteria_id', 'nama', 'deskripsi', 'prioritas', 'bobot'];

    public function Criteria()
    {
        return $this->belongsTo(Criteria::class, 'criteria_id', 'id');
    }

    public function ExtracuricullarSubCriteria() {
        return $this->hasMany(ExtracuricullarSubKriteria::class);
    }
}
