38 lines
687 B
PHP
38 lines
687 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ConsistencyRatioAlternatif extends Model
|
|
{
|
|
protected $fillable = [
|
|
'kriteria_id',
|
|
'waktu_makan_id',
|
|
'komponen_id',
|
|
'ci',
|
|
'cr',
|
|
'is_consistent'
|
|
];
|
|
|
|
protected $casts = [
|
|
'ci' => 'float',
|
|
'cr' => 'float',
|
|
'is_consistent' => 'boolean'
|
|
];
|
|
|
|
public function kriteria()
|
|
{
|
|
return $this->belongsTo(Kriteria::class);
|
|
}
|
|
|
|
public function waktuMakan()
|
|
{
|
|
return $this->belongsTo(WaktuMakan::class);
|
|
}
|
|
|
|
public function komponen()
|
|
{
|
|
return $this->belongsTo(Komponen::class);
|
|
}
|
|
}
|