22 lines
576 B
PHP
22 lines
576 B
PHP
<?php
|
|
|
|
namespace Modules\Api\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
final class WebhookDelivery extends Model
|
|
{
|
|
protected $fillable = ['webhook_id', 'uuid', 'event', 'payload', 'response_status', 'response_body', 'attempts', 'delivered_at', 'failed_at'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['payload' => 'array', 'delivered_at' => 'datetime', 'failed_at' => 'datetime'];
|
|
}
|
|
|
|
public function webhook(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Webhook::class);
|
|
}
|
|
}
|