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

class EmployeeEmploymentHistory extends Model
{
    protected $table = 'employee_employment_history';

    protected $fillable = [
        'employee_id', 'date_from', 'date_to', 'position',
        'employer_name', 'employer_address', 'highest_salary', 'reason_for_leaving',
    ];

    protected $casts = [
        'date_from' => 'date',
        'date_to'   => 'date',
    ];

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