<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class P1PersetujuanPenelitian extends Model
{
    use HasFactory;

    protected $table = 'p1_persetujuan_penelitian';
    protected $primaryKey = 'nosrt';
    public $incrementing = false;
    protected $keyType = 'string';

    protected $fillable = [
        'nosrt',
        'tanggal',
        'nim',
        'nama',
        'jurusan',
        'alamat',
        'lokasi_penelitian',
        'judul'
    ];

    public function mahasiswa()
    {
        return $this->belongsTo(Mahasiswa::class, 'nim', 'nim');
    }
}
