<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Kcd extends Model
{
    protected $fillable = ['name', 'code', 'address', 'phone', 'head_name', 'head_nip', 'is_active'];

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

    public function schools()
    {
        return $this->hasMany(School::class);
    }

    public function supervisorAssignments()
    {
        return $this->hasMany(SupervisorKcdAssignment::class);
    }
}
