48 lines
1.0 KiB
PHP
48 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class DataTesting extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'data_testing';
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'created_by',
|
|
'nama',
|
|
|
|
// Teks Inputan Asli (RAW) dari Siswa
|
|
'nilai_raw',
|
|
'mapel_favorit_raw',
|
|
'minat_raw',
|
|
'cita_cita_raw',
|
|
'preferensi_studi_raw',
|
|
|
|
// Hasil Konversi/Kategori dari PreprocessingService
|
|
'nilai',
|
|
'mapel_favorit',
|
|
'minat',
|
|
'cita_cita',
|
|
'preferensi_studi',
|
|
|
|
// Hasil Prediksi Akhir Algoritma C4.5
|
|
'hasil_rekomendasi'
|
|
];
|
|
|
|
// Relasi ke Siswa pemilik data
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
|
|
// Relasi ke User penginput (Admin / Siswa itu sendiri)
|
|
public function creator()
|
|
{
|
|
return $this->belongsTo(User::class, 'created_by');
|
|
}
|
|
} |