<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class StudentGrade extends Model
{
    protected $table = 'student_grade';
    protected $fillable = [
        'student_id',
        'task_id',
        'file',
        'grade',
    ];

    public function student()
    {
        return $this->belongsTo(Student::class, 'student_id');
    }

    public function task()
    {
        return $this->belongsTo(StudentTask::class, 'task_id');
    }
}
