<?php

namespace App\Models;

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

class OrganizationChart extends Model
{
    use HasFactory;

    protected $fillable = [
        'campus_id',
        'title',
        'image_url',
        'is_active',
    ];

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

    /**
     * Relasi ke model Campus.
     */
    public function campus(): BelongsTo
    {
        return $this->belongsTo(Campus::class);
    }
}
