Refactor models.

This commit is contained in:
James Cole
2025-09-14 09:00:01 +02:00
parent 935453796e
commit 9d9483e20f
46 changed files with 688 additions and 676 deletions

View File

@@ -72,6 +72,17 @@ class WebhookMessage extends Model
return $this->hasMany(WebhookAttempt::class);
}
protected function casts(): array
{
return [
'sent' => 'boolean',
'errored' => 'boolean',
'uuid' => 'string',
'message' => 'json',
'logs' => 'json',
];
}
/**
* Get the amount
*/
@@ -88,15 +99,4 @@ class WebhookMessage extends Model
get: static fn($value) => (int)$value,
);
}
protected function casts(): array
{
return [
'sent' => 'boolean',
'errored' => 'boolean',
'uuid' => 'string',
'message' => 'json',
'logs' => 'json',
];
}
}