<?php

namespace App\Models;

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

class SendLog extends Model
{
    protected $fillable = [
        'device_id', 'mode', 'success', 'message', 'duration_ms', 'triggered_by',
    ];

    protected $casts = [
        'success' => 'boolean',
    ];

    public function device(): BelongsTo
    {
        return $this->belongsTo(Device::class);
    }
}
