<?php

namespace App\Models;

use App\Models\User;
use App\Models\Student;
use App\Models\StudentNotesType;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class StudentNote extends Model
{
    use HasFactory;

    
    /**
     * The attributes that are mass assignable.
     *
     * @var string[]
     */
    
    protected $fillable = [
        'student_id',
        'text',
        'type_id',
        'user_id',
    ];

    public function user(){
       return $this->belongsTo(User::class);
    }
    public function student(){
        return $this->belongsTo(Student::class);
     }
     public function type(){
        return $this->belongsTo(StudentNotesType::class,'type_id');
     }

     
}
