<?php

namespace App\Models;

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

class KrsPaket extends Model
{
    use HasFactory;

    protected $fillable = [
        'nama',
        'deskripsi',
        'tahun_akademik_id',
        'semester',
        'prodi_id',
        'tanggal_mulai',
        'tanggal_selesai',
    ];

    public function tahunAkademik()
    {
        return $this->belongsTo(TahunAkademik::class);
    }

    public function prodi()
    {
        return $this->belongsTo(Prodi::class);
    }

    public function details()
    {
        return $this->hasMany(KrsPaketDetail::class);
    }
}
