<?php

// app/Models/OccurrenceAttachment.php

namespace App\Models;

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

class OccurrenceAttachment extends Model
{
    use HasFactory;

    protected $fillable = [
        'occurrence_id', 'file_path', 'file_name', 'file_type',
        'mime_type', 'file_size', 'uploaded_by',
    ];

    public function occurrence()
    {
        return $this->belongsTo(Occurrence::class);
    }

    public function uploadedBy()
    {
        return $this->belongsTo(User::class, 'uploaded_by');
    }
}
