<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LostKeyIncident extends Model
{
    protected $fillable = [
        'rental_id', 'reported_by', 'replacement_fee', 'fee_charged', 'notes',
    ];

    protected $casts = [
        'replacement_fee' => 'decimal:2',
        'fee_charged'     => 'boolean',
    ];

    public function rental()     { return $this->belongsTo(Rental::class); }
    public function reportedBy() { return $this->belongsTo(User::class, 'reported_by'); }
}
