<?php

namespace App\Models;

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

class MilitaryTraining extends Model
{
    use HasFactory;

    protected $table = 'military_training';

    protected $fillable = [
        'personnel_id', 'training_name', 'status', 'icon', 'color', 'completion_date'
    ];

    protected $dates = ['completion_date'];

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