<?php

namespace App\Models;

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

class EducationHistory extends Model
{
    use HasFactory;

    protected $table = 'education_history';

    protected $fillable = [
        'personnel_id', 'degree_title', 'institution', 'graduation_date',
        'gpa', 'special_recognition', 'status', 'color'
    ];

    protected $dates = ['graduation_date'];

    public function personnel()
    {
        return $this->belongsTo(MilitaryPersonnel::class, 'personnel_id');
    }
}
