<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class JawabanKuesioner extends Model
{
    protected $table = 'jawaban_kuesioners';
    protected $fillable = [
        'siswa_id',
        'pertanyaan_id',
        'nilai',
        'minggu_ke',
        'tahun',
        'tanggal_isi',
    ];

    public function pertanyaan()
    {
        return $this->belongsTo(PertanyaanKuesioner::class, 'pertanyaan_id');
    }

    public function siswa()
    {
        return $this->belongsTo(Siswa::class, 'siswa_id', 'id_siswa');
    }

}
