<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class LoanRestructuringDocument extends Model
{
    protected $fillable = [
        'loan_restructuring_id','document_type','original_name','file_path','mime_type','file_size','notes','uploaded_by',
    ];

    public function restructuring(): BelongsTo { return $this->belongsTo(LoanRestructuring::class, 'loan_restructuring_id'); }
    public function uploader(): BelongsTo { return $this->belongsTo(User::class, 'uploaded_by'); }
}
