<?php

namespace App\Models;

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

class WhmcsSyncOutbox extends Model
{
    use HasFactory;

    protected $fillable = [
        'user_id', 'order_id', 'invoice_id', 'action', 'mode', 'status', 'request_payload',
        'response_payload', 'attempt_count', 'next_attempt_at', 'locked_at', 'sent_at', 'message',
    ];

    protected $casts = [
        'request_payload' => 'array',
        'response_payload' => 'array',
        'next_attempt_at' => 'datetime',
        'locked_at' => 'datetime',
        'sent_at' => 'datetime',
    ];
}
