<?php

namespace App\Models;

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

class SistemPerkuliahan extends Model
{
    use HasFactory;

    protected $table = 'sistem_perkuliahan';

    // Kolom 'icon' dihilangkan dari $fillable
    protected $fillable = [
        'campus_id',
        'name',
        'description',
        'is_active',
    ];

    protected $casts = [
        'is_active' => 'boolean',
    ];

    public function campus()
    {
        return $this->belongsTo(Campus::class);
    }
}