<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class EmployeeEducation extends Model
{
    protected $table = 'employee_education';

    protected $fillable = [
        'employee_id', 'level', 'institution_name', 'institution_location',
        'attendance_from', 'attendance_to', 'graduated',
        'certificate_degree', 'major', 'minor',
    ];

    protected $casts = [
        'attendance_from' => 'date',
        'attendance_to'   => 'date',
        'graduated'       => 'boolean',
    ];

    public function employee() { return $this->belongsTo(Employee::class); }
}
