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

class EmployeeDocument extends Model
{
    protected $table = 'employee_documents';

    protected $fillable = [
        'employee_id', 'document_type', 'document_name',
        'file_path', 'file_size', 'expiry_date', 'verified', 'verified_by',
    ];

    protected $casts = [
        'expiry_date' => 'date',
        'verified'    => 'boolean',
    ];

    public function employee()  { return $this->belongsTo(Employee::class); }
    public function verifier()  { return $this->belongsTo(User::class, 'verified_by'); }
}
