24 lines
506 B
PHP
24 lines
506 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\TipeKriteria;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class Kriteria extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $table = 'kriteria';
|
|
protected $primaryKey = 'id';
|
|
protected $fillable = [
|
|
'kode',
|
|
'nama',
|
|
'tipe_kriteria_id',
|
|
'bobot',
|
|
];
|
|
public function tipeKriteria() {
|
|
return $this->belongsTo(TipeKriteria::class, 'tipe_kriteria_id');
|
|
}
|
|
}
|