<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class NotificationLog extends Model
{
    protected $fillable = [
        'rental_id', 'client_id', 'channel', 'type', 'recipient',
        'subject', 'body', 'status', 'error_message', 'sent_at',
    ];

    protected $casts = ['sent_at' => 'datetime'];

    public function rental() { return $this->belongsTo(Rental::class); }
    public function client() { return $this->belongsTo(Client::class); }
}
