<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

final class IdempotencyRecord extends Model
{
    protected $fillable = [
        'merchant_id', 'environment', 'operation', 'idempotency_key',
        'request_hash', 'response_code', 'response_body', 'completed_at',
    ];

    protected function casts(): array
    {
        return [
            'response_body' => 'array',
            'completed_at' => 'datetime',
        ];
    }
}
