36 lines
639 B
PHP
36 lines
639 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PreferensiWaktuKriteria extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'preferensi_waktu_kriteria';
|
|
|
|
protected $fillable = [
|
|
'waktu_makan_id',
|
|
'kriteria_id',
|
|
'bobot',
|
|
];
|
|
|
|
/**
|
|
* Relasi ke model WaktuMakan
|
|
*/
|
|
public function waktuMakan()
|
|
{
|
|
return $this->belongsTo(WaktuMakan::class);
|
|
}
|
|
|
|
/**
|
|
* Relasi ke model Kriteria
|
|
*/
|
|
public function kriteria()
|
|
{
|
|
return $this->belongsTo(Kriteria::class);
|
|
}
|
|
}
|