<?php

namespace App\Models;

use App\Models\Concerns\BelongsToOwner;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class InvestigationAttachment extends Model
{
    use BelongsToOwner;

    protected $table = 'care_investigation_attachments';

    protected $fillable = [
        'owner_ref', 'investigation_result_id', 'file_path', 'original_name',
        'mime_type', 'uploaded_by',
    ];

    public function result(): BelongsTo
    {
        return $this->belongsTo(InvestigationResult::class, 'investigation_result_id');
    }
}
