<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;

#[Fillable([
    'provider_key',
    'provider_event_id',
    'event_type',
    'processed_at',
    'payload',
])]
class WebhookEvent extends Model
{
    protected function casts(): array
    {
        return [
            'processed_at' => 'datetime',
            'payload' => 'array',
        ];
    }
}
